/**
  * @dataProvider controllers
  * @test
  *
  * @param string $controller
  * @param string $actionClass
  */
 public function it_returns_the_action_class_for_a_given_controller_name($controller, $actionClass)
 {
     $this->assertEquals($actionClass, ApiHelper::getActionClassFromControllerName($controller));
 }
 /**
  * @param GetResponseForControllerResultEvent $event
  * @return \BiteCodes\RestApiGeneratorBundle\Api\Actions\Action|bool
  */
 protected function getAction(GetResponseForControllerResultEvent $event)
 {
     $apiResourceName = $event->getRequest()->attributes->get('_api_resource');
     $controllerName = $event->getRequest()->attributes->get('_controller');
     $apiResource = $this->manager->getResource($apiResourceName);
     return $apiResource ? $apiResource->getAction(ApiHelper::getActionClassFromControllerName($controllerName)) : false;
 }