Skip to content

Commit 3b4c4d1

Browse files
committed
"CoversTest" -> add only one more test
1 parent 069a785 commit 3b4c4d1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tests/unit/DocBlock/Tags/CoversTest.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
use Mockery as m;
1717
use phpDocumentor\Reflection\DocBlock\Description;
1818
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
19+
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
20+
use phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen as FqsenRef;
21+
use phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen as TagsFqsen;
1922
use phpDocumentor\Reflection\Fqsen;
2023
use phpDocumentor\Reflection\FqsenResolver;
2124
use phpDocumentor\Reflection\Types\Context;
@@ -174,6 +177,35 @@ public function testStringRepresentationIsReturnedWithoutDescription() : void
174177
$this->assertSame('\DateTime', (string) $fixture);
175178
}
176179

180+
/**
181+
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See::<public>
182+
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
183+
* @uses \phpDocumentor\Reflection\FqsenResolver
184+
* @uses \phpDocumentor\Reflection\DocBlock\Description
185+
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Url
186+
* @uses \phpDocumentor\Reflection\Types\Context
187+
*
188+
* @covers ::create
189+
*/
190+
public function testFactoryMethodWithSpaceBeforeClass() : void
191+
{
192+
$fqsenResolver = new FqsenResolver();
193+
$tagFactory = new StandardTagFactory($fqsenResolver);
194+
$descriptionFactory = new DescriptionFactory($tagFactory);
195+
$context = new Context('');
196+
197+
$fixture = Covers::create(
198+
'Foo My Description ',
199+
$descriptionFactory,
200+
$fqsenResolver,
201+
$context
202+
);
203+
204+
$this->assertSame('\Foo My Description ', (string) $fixture);
205+
$this->assertSame('\Foo', (string) $fixture->getReference());
206+
$this->assertSame('My Description ', $fixture->getDescription() . '');
207+
}
208+
177209
/**
178210
* @covers ::__construct
179211
* @covers ::__toString

0 commit comments

Comments
 (0)