X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FCommentTest.php;fp=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FCommentTest.php;h=7b6c2aabe9af015ddd63139590db6fc9f5891672;hp=081dd57b7f4665b739fbc00c5f62fccaeabe9511;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/nikic/php-parser/test/PhpParser/CommentTest.php b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php index 081dd57b7..7b6c2aabe 100644 --- a/vendor/nikic/php-parser/test/PhpParser/CommentTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php @@ -1,16 +1,19 @@ -assertSame('/* Some comment */', $comment->getText()); $this->assertSame('/* Some comment */', (string) $comment); $this->assertSame(1, $comment->getLine()); $this->assertSame(10, $comment->getFilePos()); + $this->assertSame(2, $comment->getTokenPos()); } /** @@ -22,10 +25,10 @@ class CommentTest extends \PHPUnit_Framework_TestCase } public function provideTestReformatting() { - return array( - array('// Some text' . "\n", '// Some text'), - array('/* Some text */', '/* Some text */'), - array( + return [ + ['// Some text' . "\n", '// Some text'], + ['/* Some text */', '/* Some text */'], + [ '/** * Some text. * Some more text. @@ -34,8 +37,8 @@ class CommentTest extends \PHPUnit_Framework_TestCase * Some text. * Some more text. */' - ), - array( + ], + [ '/* Some text. Some more text. @@ -44,30 +47,30 @@ class CommentTest extends \PHPUnit_Framework_TestCase Some text. Some more text. */' - ), - array( + ], + [ '/* Some text. More text. Even more text. */', '/* Some text. More text. Even more text. */' - ), - array( + ], + [ '/* Some text. More text. Indented text. */', '/* Some text. More text. Indented text. */', - ), + ], // invalid comment -> no reformatting - array( + [ 'hallo world', 'hallo world', - ), - ); + ], + ]; } -} \ No newline at end of file +}