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( new Container(), $this->routes, $this->createMock(ControllerNameParser::class), [ $this->routeDescriber ] ); } }