| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function testRemoveAnnotation() |
||
| 11 | { |
||
| 12 | $comment = new Comment(<<<EOF |
||
| 13 | Foo bar |
||
| 14 | |||
| 15 | @Yop |
||
| 16 | @Yop("toto") |
||
| 17 | @Yop () |
||
| 18 | @Yop |
||
| 19 | @Foo |
||
| 20 | EOF |
||
| 21 | ); |
||
| 22 | $this->assertTrue($comment->hasAnnotation('Yop')); |
||
| 23 | $this->assertTrue($comment->hasAnnotation('@Yop')); |
||
| 24 | $comment->removeAnnotation('Yop'); |
||
| 25 | $this->assertFalse($comment->hasAnnotation('Yop')); |
||
| 26 | $this->assertFalse($comment->hasAnnotation('@Yop')); |
||
| 27 | $this->assertSame(<<<EOF |
||
| 28 | Foo bar |
||
| 29 | |||
| 30 | @Foo |
||
| 31 | EOF |
||
| 32 | , $comment->getComment()); |
||
| 33 | } |
||
| 34 | |||
| 50 |