@@ 153-157 (lines=5) @@ | ||
150 | { |
|
151 | $regex = '~'.$text.'~ui'; |
|
152 | ||
153 | foreach ($this->output as $line) { |
|
154 | if (preg_match($regex, $line) === 1) { |
|
155 | throw new \Exception(sprintf("The text '%s' was found somewhere on output of command.\n%s", $text, implode("\n", $this->output))); |
|
156 | } |
|
157 | } |
|
158 | } |
|
159 | ||
160 | /** |
|
@@ 166-170 (lines=5) @@ | ||
163 | public function outputShouldBe(PyStringNode $string) |
|
164 | { |
|
165 | $expected = $string->getStrings(); |
|
166 | foreach ($this->output as $index => $line) { |
|
167 | if ($line !== $expected[$index]) { |
|
168 | throw new \Exception(sprintf("instead of\n%s", implode("\n", $this->output))); |
|
169 | } |
|
170 | } |
|
171 | } |
|
172 | ||
173 | /** |