File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,37 @@ public function testReturnTypeThis() : void
342
342
$ this ->assertInstanceOf (This::class, $ fixture ->getReturnType ());
343
343
}
344
344
345
+ /**
346
+ * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
347
+ * @uses \phpDocumentor\Reflection\TypeResolver
348
+ * @uses \phpDocumentor\Reflection\DocBlock\Description
349
+ * @uses \phpDocumentor\Reflection\Types\Context
350
+ *
351
+ * @covers ::create
352
+ */
353
+ public function testReturnTypeNoneWithLongMethodName () : void
354
+ {
355
+ $ descriptionFactory = m::mock (DescriptionFactory::class);
356
+ $ resolver = new TypeResolver ();
357
+ $ context = new Context ('' );
358
+
359
+ $ description = new Description ('' );
360
+
361
+ $ descriptionFactory ->shouldReceive ('create ' )->with ('' , $ context )->andReturn ($ description );
362
+
363
+ $ fixture = Method::create (
364
+ 'myVeryLongMethodName($node) ' ,
365
+ $ resolver ,
366
+ $ descriptionFactory ,
367
+ $ context
368
+ );
369
+
370
+ $ this ->assertFalse ($ fixture ->isStatic ());
371
+ $ this ->assertSame ('void myVeryLongMethodName(mixed $node) ' , (string ) $ fixture );
372
+ $ this ->assertSame ('myVeryLongMethodName ' , $ fixture ->getMethodName ());
373
+ $ this ->assertInstanceOf (Void_::class, $ fixture ->getReturnType ());
374
+ }
375
+
345
376
/**
346
377
* @return string[][]
347
378
*/
You can’t perform that action at this time.
0 commit comments