|
16 | 16 | use Mockery as m;
|
17 | 17 | use phpDocumentor\Reflection\DocBlock\Description;
|
18 | 18 | 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; |
19 | 22 | use phpDocumentor\Reflection\Fqsen;
|
20 | 23 | use phpDocumentor\Reflection\FqsenResolver;
|
21 | 24 | use phpDocumentor\Reflection\Types\Context;
|
@@ -174,6 +177,35 @@ public function testStringRepresentationIsReturnedWithoutDescription() : void
|
174 | 177 | $this->assertSame('\DateTime', (string) $fixture);
|
175 | 178 | }
|
176 | 179 |
|
| 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 | + |
177 | 209 | /**
|
178 | 210 | * @covers ::__construct
|
179 | 211 | * @covers ::__toString
|
|
0 commit comments