mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 13:21:12 +01:00
Add additional tests for modifying a Nop comment
This commit is contained in:
parent
40aa2282df
commit
f56d90d4f8
@ -37,3 +37,40 @@ class Foo {
|
||||
$foo;
|
||||
}
|
||||
}
|
||||
-----
|
||||
<?php
|
||||
class Foo {
|
||||
public function __construct()
|
||||
{
|
||||
/* I'm just a comment */
|
||||
}
|
||||
}
|
||||
-----
|
||||
$stmts[0]->stmts[0]->stmts[0]->setAttribute('comments', [new Comment("/* I'm a new comment */")]);
|
||||
-----
|
||||
<?php
|
||||
class Foo {
|
||||
public function __construct()
|
||||
{
|
||||
/* I'm a new comment */
|
||||
|
||||
}
|
||||
}
|
||||
-----
|
||||
<?php
|
||||
class Foo {
|
||||
public function __construct()
|
||||
{
|
||||
// I'm just a comment
|
||||
}
|
||||
}
|
||||
-----
|
||||
$stmts[0]->stmts[0]->stmts[0]->setAttribute('comments', [new Comment("// I'm a new comment\n")]);
|
||||
-----
|
||||
<?php
|
||||
class Foo {
|
||||
public function __construct()
|
||||
{
|
||||
// I'm a new comment
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user