| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function testExit(): void |
||
| 20 | { |
||
| 21 | $_SERVER['REQUEST_METHOD'] = 'OPTIONS'; |
||
| 22 | $response = new ResponseMock(); |
||
| 23 | |||
| 24 | $behavior = new OptionsRequestBehavior([ |
||
| 25 | 'response' => $response |
||
| 26 | ]); |
||
| 27 | try { |
||
| 28 | $behavior->check(); |
||
| 29 | } catch (ExitException $exception) { |
||
| 30 | $this->assertTrue($response->triggered); |
||
| 31 | throw $exception; |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 43 |