|
@@ 180-186 (lines=7) @@
|
| 177 |
|
* |
| 178 |
|
* @Then /^(?:the )?response should contain "([^"]*)"$/ |
| 179 |
|
*/ |
| 180 |
|
public function theResponseShouldContain($text) |
| 181 |
|
{ |
| 182 |
|
$expectedRegexp = '/'.preg_quote($text).'/i'; |
| 183 |
|
$bodyResponse = (string) $this->getResponse()->getBody(); |
| 184 |
|
|
| 185 |
|
Assert::assertRegExp($expectedRegexp, $bodyResponse); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
/** |
| 189 |
|
* Checks that response body doesn't contains specific text. |
|
@@ 195-201 (lines=7) @@
|
| 192 |
|
* |
| 193 |
|
* @Then /^(?:the )?response should not contain "([^"]*)"$/ |
| 194 |
|
*/ |
| 195 |
|
public function theResponseShouldNotContain($text) |
| 196 |
|
{ |
| 197 |
|
$expectedRegexp = '/'.preg_quote($text).'/'; |
| 198 |
|
$bodyResponse = (string) $this->getResponse()->getBody(); |
| 199 |
|
|
| 200 |
|
Assert::assertNotRegExp($expectedRegexp, $bodyResponse); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
/** |
| 204 |
|
* Checks that response body contains JSON from PyString. |