@@ -472,6 +472,40 @@ public function testCreateMethodParenthesisMissing() : void
472472 $ this ->assertSame ($ description , $ fixture ->getDescription ());
473473 }
474474
475+ /**
476+ * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
477+ * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
478+ * @uses \phpDocumentor\Reflection\TypeResolver
479+ * @uses \phpDocumentor\Reflection\DocBlock\Description
480+ * @uses \phpDocumentor\Reflection\Fqsen
481+ * @uses \phpDocumentor\Reflection\Types\Context
482+ *
483+ * @covers ::create
484+ */
485+ public function testCreateMethodEmptyArguments () : void
486+ {
487+ $ descriptionFactory = m::mock (DescriptionFactory::class);
488+ $ resolver = new TypeResolver ();
489+ $ context = new Context ('' );
490+
491+ $ description = new Description ('My Description ' );
492+
493+ $ descriptionFactory ->shouldReceive ('create ' )->with ('My Description ' , $ context )->andReturn ($ description );
494+
495+ $ fixture = Method::create (
496+ 'static void myMethod() My Description ' ,
497+ $ resolver ,
498+ $ descriptionFactory ,
499+ $ context
500+ );
501+
502+ $ this ->assertSame ('static void myMethod() My Description ' , (string ) $ fixture );
503+ $ this ->assertSame ('myMethod ' , $ fixture ->getMethodName ());
504+ $ this ->assertEquals ([], $ fixture ->getArguments ());
505+ $ this ->assertInstanceOf (Void_::class, $ fixture ->getReturnType ());
506+ $ this ->assertSame ($ description , $ fixture ->getDescription ());
507+ }
508+
475509 /**
476510 * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
477511 * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
0 commit comments