1 | <?php declare(strict_types=1); |
||
12 | final class ResponseContext implements Context |
||
13 | { |
||
14 | use Response; |
||
15 | |||
16 | public function __construct(HttpHistory $history) |
||
20 | |||
21 | /** @Then the status code should be :expected */ |
||
22 | public function status_code_should_be(int $expected): void |
||
27 | |||
28 | /** @Then the status code should not be :expected */ |
||
29 | public function status_code_should_not_be(int $expected): void |
||
34 | |||
35 | /** @Then the content-type should be equal to :expected */ |
||
36 | public function content_type_should_be(string $expected): void |
||
41 | |||
42 | /** @Then the response header :header should be equal to :expected */ |
||
43 | public function header_should_be(string $header, string $expected): void |
||
48 | |||
49 | /** @Then the response header :header should contain :expected */ |
||
50 | public function header_should_contain(string $header, string $expected): void |
||
55 | |||
56 | /** @Then the response should have a header :header */ |
||
57 | public function response_should_have_header(string $header): void |
||
62 | |||
63 | /** @Then the response should have sent some data */ |
||
64 | public function response_should_have_sent_some_data(): void |
||
71 | |||
72 | /** @Then the response should not have sent any data */ |
||
73 | public function response_should_not_have_any_data(): void |
||
78 | |||
79 | /** @Then the response should contain :data */ |
||
80 | public function response_should_contain(string $data): void |
||
85 | |||
86 | /** @Then the response should not contain :data */ |
||
87 | public function response_should_not_contain(string $data): void |
||
92 | |||
93 | /** @Then the response should be :data */ |
||
94 | public function response_should_be(string $data): void |
||
99 | |||
100 | /** @Then the response should not be :data */ |
||
101 | public function response_should_not_be(string $data): void |
||
106 | |||
107 | } |
||
108 |