setParameter('kernel.bundles', []); $extension = new NelmioApiDocExtension(); $extension->load([ [ 'documentation' => [ 'info' => [ 'title' => 'API documentation', 'description' => 'This is the api documentation, use it wisely', ], ], ], [ 'documentation' => [ 'tags' => [ [ 'name' => 'secured', 'description' => 'Requires authentication', ], [ 'name' => 'another', 'description' => 'Another tag serving another purpose', ], ], ], ], [ 'documentation' => [ 'paths' => [ '/api/v1/model' => [ 'get' => [ 'tags' => ['secured'], ], ], ], ], ], ], $container); $this->assertSame([ 'info' => [ 'title' => 'API documentation', 'description' => 'This is the api documentation, use it wisely', ], 'tags' => [ [ 'name' => 'secured', 'description' => 'Requires authentication', ], [ 'name' => 'another', 'description' => 'Another tag serving another purpose', ], ], 'paths' => [ '/api/v1/model' => [ 'get' => [ 'tags' => ['secured'], ], ], ], ], $container->getDefinition('nelmio_api_doc.describers.config')->getArgument(0)); } }