routes->add('foo', new Route('foo')); $this->routeDescriber->expects($this->never()) ->method('describe'); $this->assertEquals((new Swagger())->toArray(), $this->getSwaggerDoc()->toArray()); } protected function setUp() { $this->routeDescriber = $this->createMock(RouteDescriberInterface::class); $this->routes = new RouteCollection(); $this->describer = new RouteDescriber( $this->routes, new ControllerReflector( new Container(), $this->createMock(ControllerNameParser::class) ), [$this->routeDescriber] ); } }