/** * Test block comment. */ public function testBlockComment() { $source = <<<'EOF' <?php /** ignore */ // Line one // Line two // Line three // Line four EOF; $tree = $this->parseSource($source); $comments = $tree->children(Filter::isComment(FALSE)); /** @var LineCommentBlockNode $comment_block */ $comment_block = $comments[0]; $this->assertInstanceOf('\\Pharborist\\LineCommentBlockNode', $comment_block); $this->assertEquals("Line one\nLine two\nLine three", $comment_block->getCommentText()); /** @var CommentNode $comment */ $comment = $comments[1]; $this->assertInstanceOf('\\Pharborist\\CommentNode', $comment); $this->assertEquals("Line four", $comment->getCommentText()); }