for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TheCodingMachine\FluidSchema;
use PHPUnit\Framework\TestCase;
class CommentTest extends TestCase
{
public function testRemoveAnnotation()
$comment = new Comment(<<<EOF
Foo bar
@Yop
@Yop("toto")
@Yop ()
@Foo
EOF
);
$this->assertTrue($comment->hasAnnotation('Yop'));
$this->assertTrue($comment->hasAnnotation('@Yop'));
$comment->removeAnnotation('Yop');
$this->assertFalse($comment->hasAnnotation('Yop'));
$this->assertFalse($comment->hasAnnotation('@Yop'));
$this->assertSame(<<<EOF
, $comment->getComment());
}
public function testAddAnnotation()
Foo
$comment->addAnnotation('Yop', true);
@Yop(true)