Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
22 | final class ResponseContext implements Context, ClientAwareInterface |
||
23 | { |
||
24 | use ClientAwareTrait; |
||
25 | |||
26 | /** |
||
27 | * Checks, that current response status is equal to specified |
||
28 | * Example: Then the response status code should be 200 |
||
29 | * Example: And the response status code should be 400 |
||
30 | * |
||
31 | * @Then /^the response status code should be (?P<code>\d+)$/ |
||
32 | */ |
||
33 | public function assertResponseStatus($code) |
||
34 | { |
||
35 | Assert::assertEquals($this->client->getResponse()->getStatusCode(), $code); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @Then the response is OK |
||
40 | */ |
||
41 | public function assertResponseIsOk() |
||
44 | } |
||
45 | } |