| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 14 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | View Code Duplication | public function response_content_should_not_match(PyStringNode $pattern) |
|
| 42 | { |
||
| 43 | $matcher = $this->factory->createMatcher(); |
||
| 44 | $content = (string) $this->getResponse()->getBody(); |
||
| 45 | |||
| 46 | if (!$matcher->match($content, $pattern->getRaw())) { |
||
| 47 | return; |
||
| 48 | } |
||
| 49 | |||
| 50 | throw new InvalidArgumentException(sprintf( |
||
| 51 | 'The response matches with the pattern "%s"', |
||
| 52 | $pattern->getRaw() |
||
| 53 | )); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |