@@ -16,7 +16,6 @@ |
||
16 | 16 | protected $contentTypes = array('text/html', 'application/json', 'application/xml'); |
17 | 17 | |
18 | 18 | /** |
19 | - * @param int $string The string that the document must contain |
|
20 | 19 | */ |
21 | 20 | public function init(array $regExs) |
22 | 21 | { |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | if ($regEx['isRegEx']) { |
43 | 43 | $pattern = str_replace('', '\\~', $regEx['pattern']); |
44 | 44 | |
45 | - if (preg_match('~' . $pattern . '~', (string)$response->getBody()) === 0) { |
|
46 | - $errors[] = 'Regular expression: ' . $regEx['pattern']; |
|
45 | + if (preg_match('~'.$pattern.'~', (string) $response->getBody()) === 0) { |
|
46 | + $errors[] = 'Regular expression: '.$regEx['pattern']; |
|
47 | 47 | } |
48 | 48 | } else { |
49 | - if (preg_match('^' . preg_quote($regEx['pattern']) . '^', (string)$response->getBody()) === 0) { |
|
50 | - $errors[] = 'Text: ' . $regEx['pattern']; |
|
49 | + if (preg_match('^'.preg_quote($regEx['pattern']).'^', (string) $response->getBody()) === 0) { |
|
50 | + $errors[] = 'Text: '.$regEx['pattern']; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $errorString = 'The following text elements were not found: <ul>'; |
57 | 57 | |
58 | 58 | foreach ($errors as $error) { |
59 | - $errorString .= '<li>' . $error . '</li>'; |
|
59 | + $errorString .= '<li>'.$error.'</li>'; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | $errorString .= '</ul>'; |