Added test case

This commit is contained in:
Mario Franco 2013-04-16 19:40:29 +01:00
parent bb9fd6d756
commit 93e83e610c
2 changed files with 20 additions and 0 deletions

View File

@ -179,4 +179,16 @@ class ApiDocExtractorTest extends WebTestCase
$annotation->getCache()
);
}
public function testGetWithDeprecated()
{
$container = $this->getContainer();
$extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor');
$annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::DeprecatedAction', 'test_route_15');
$this->assertNotNull($annotation);
$this->assertTrue(
$annotation->getDeprecated()
);
}
}

View File

@ -154,4 +154,12 @@ class TestController
public function cachedAction()
{
}
/**
* @ApiDoc()
* @deprecated
*/
public function deprecatedAction()
{
}
}