@@ -482,6 +482,40 @@ public function testCreateMethodParenthesisMissing()
482
482
483
483
/**
484
484
* @covers ::create
485
+ * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
486
+ * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
487
+ * @uses \phpDocumentor\Reflection\TypeResolver
488
+ * @uses \phpDocumentor\Reflection\DocBlock\Description
489
+ * @uses \phpDocumentor\Reflection\Fqsen
490
+ * @uses \phpDocumentor\Reflection\Types\Context
491
+ *
492
+ * @covers ::create
493
+ */
494
+ public function testCreateMethodEmptyArguments () : void
495
+ {
496
+ $ descriptionFactory = m::mock (DescriptionFactory::class);
497
+ $ resolver = new TypeResolver ();
498
+ $ context = new Context ('' );
499
+
500
+ $ description = new Description ('My Description ' );
501
+
502
+ $ descriptionFactory ->shouldReceive ('create ' )->with ('My Description ' , $ context )->andReturn ($ description );
503
+
504
+ $ fixture = Method::create (
505
+ 'static void myMethod() My Description ' ,
506
+ $ resolver ,
507
+ $ descriptionFactory ,
508
+ $ context
509
+ );
510
+
511
+ $ this ->assertSame ('static void myMethod() My Description ' , (string ) $ fixture );
512
+ $ this ->assertSame ('myMethod ' , $ fixture ->getMethodName ());
513
+ $ this ->assertEquals ([], $ fixture ->getArguments ());
514
+ $ this ->assertInstanceOf (Void_::class, $ fixture ->getReturnType ());
515
+ $ this ->assertSame ($ description , $ fixture ->getDescription ());
516
+ }
517
+
518
+ /**
485
519
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
486
520
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
487
521
* @uses \phpDocumentor\Reflection\TypeResolver
0 commit comments