Symfony\Bundle\FrameworkBundle\Tests\Controller\TestController::createAccessDeniedException PHP Method

createAccessDeniedException() public method

public createAccessDeniedException ( $message = 'Access Denied.', Exception $previous = null )
$previous Exception
    public function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null)
    {
        return parent::createAccessDeniedException($message, $previous);
    }

Usage Example

 public function testCreateAccessDeniedException()
 {
     $controller = new TestController();
     $this->assertInstanceOf('Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException', $controller->createAccessDeniedException());
 }