Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class TestResponse extends \Illuminate\Foundation\Testing\TestResponse |
||
7 | { |
||
8 | /** |
||
9 | * Assert that the response has the given status code. |
||
10 | * |
||
11 | * @param int $status |
||
12 | * @return $this |
||
13 | */ |
||
14 | public function assertStatus($status) |
||
15 | { |
||
16 | $actual = $this->getStatusCode(); |
||
|
|||
17 | |||
18 | PHPUnit::assertTrue( |
||
19 | $actual === $status, |
||
20 | "Expected status code {$status} but received {$actual}. Response content: \n". |
||
21 | print_r($this->responseContent(), true) |
||
22 | ); |
||
23 | |||
24 | return $this; |
||
25 | } |
||
26 | |||
27 | public function responseContent() |
||
38 | } |
||
39 | } |
||
40 |