mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Add more tests
This commit is contained in:
@@ -124,15 +124,17 @@ class DocBlockTest extends TestCase
|
||||
$tag1 = m::mock(DocBlock\Tag::class);
|
||||
$tag2 = m::mock(DocBlock\Tag::class);
|
||||
$tag3 = m::mock(DocBlock\Tag::class);
|
||||
$tags = [$tag1, $tag2, $tag3];
|
||||
$tag4 = m::mock(DocBlock\Tag::class);
|
||||
$tags = [$tag1, $tag2, $tag3, $tag4];
|
||||
|
||||
$tag1->shouldReceive('getName')->andReturn('abc');
|
||||
$tag2->shouldReceive('getName')->andReturn('abcd');
|
||||
$tag4->shouldReceive('getName')->andReturn('abcd');
|
||||
$tag3->shouldReceive('getName')->andReturn('ab');
|
||||
|
||||
$fixture = new DocBlock('', null, $tags);
|
||||
|
||||
$this->assertSame([$tag2], $fixture->getTagsByName('abcd'));
|
||||
$this->assertSame([$tag2, $tag4], $fixture->getTagsByName('abcd'));
|
||||
$this->assertSame([], $fixture->getTagsByName('Ebcd'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user