|
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; |
19 | 20 | use phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen as FqsenRef;
|
| 21 | +use phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen as TagsFqsen; |
20 | 22 | use phpDocumentor\Reflection\DocBlock\Tags\Reference\Url as UrlRef;
|
21 | 23 | use phpDocumentor\Reflection\Fqsen;
|
22 | 24 | use phpDocumentor\Reflection\FqsenResolver;
|
@@ -251,6 +253,36 @@ public function testFactoryMethodWithUrl() : void
|
251 | 253 | $this->assertSame($description, $fixture->getDescription());
|
252 | 254 | }
|
253 | 255 |
|
| 256 | + /** |
| 257 | + * @uses \phpDocumentor\Reflection\DocBlock\Tags\See::<public> |
| 258 | + * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory |
| 259 | + * @uses \phpDocumentor\Reflection\FqsenResolver |
| 260 | + * @uses \phpDocumentor\Reflection\DocBlock\Description |
| 261 | + * @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Url |
| 262 | + * @uses \phpDocumentor\Reflection\Types\Context |
| 263 | + * |
| 264 | + * @covers ::create |
| 265 | + */ |
| 266 | + public function testFactoryMethodWithoutUrl() : void |
| 267 | + { |
| 268 | + $fqsenResolver = new FqsenResolver(); |
| 269 | + $tagFactory = new StandardTagFactory($fqsenResolver); |
| 270 | + $descriptionFactory = new DescriptionFactory($tagFactory); |
| 271 | + $context = new Context(''); |
| 272 | + |
| 273 | + $fixture = See::create( |
| 274 | + 'Foo My Description ', |
| 275 | + $fqsenResolver, |
| 276 | + $descriptionFactory, |
| 277 | + $context |
| 278 | + ); |
| 279 | + |
| 280 | + $this->assertSame('\Foo My Description ', (string) $fixture); |
| 281 | + $this->assertInstanceOf(TagsFqsen::class, $fixture->getReference()); |
| 282 | + $this->assertSame('\Foo', (string) $fixture->getReference()); |
| 283 | + $this->assertSame('My Description ', $fixture->getDescription() . ''); |
| 284 | + } |
| 285 | + |
254 | 286 | /**
|
255 | 287 | * @covers ::create
|
256 | 288 | */
|
|
0 commit comments