| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | public function testAccessIsNotGranted() |
||
| 51 | { |
||
| 52 | $this->expectException(AccessDeniedException::class); |
||
| 53 | $this->authorizationChecker->shouldReceive('isGranted')->andReturn(false); |
||
| 54 | $middleware = new SecurityMiddleware($this->authorizationChecker); |
||
| 55 | $handled = false; |
||
| 56 | $middleware->execute(new FakeCommand(), function () use(&$handled) { |
||
| 57 | $handled = true; |
||
| 58 | }); |
||
| 59 | |||
| 60 | $this->assertFalse($handled); |
||
| 61 | } |
||
| 62 | } |
||
| 63 |