Example #1
0
 public function testAccessDenied()
 {
     $application = new Application();
     try {
         $application->accessDenied();
     } catch (AccessDenied $e) {
     }
     $this->assertSame(403, $e->getCode());
     $this->assertSame('Access denied', $e->getMessage());
     $application = new Application();
     try {
         $application->accessDenied('message');
     } catch (AccessDenied $e) {
     }
     $this->assertSame('message', $e->getMessage());
 }