@@ 143-147 (lines=5) @@ | ||
140 | { |
|
141 | $regex = '~'.$text.'~ui'; |
|
142 | ||
143 | foreach ($this->output as $line) { |
|
144 | if (preg_match($regex, $line) === 1) { |
|
145 | throw new \Exception(sprintf("The text '%s' was found somewhere on output of command.\n%s", $text, implode("\n", $this->output))); |
|
146 | } |
|
147 | } |
|
148 | } |
|
149 | ||
150 | /** |
|
@@ 156-160 (lines=5) @@ | ||
153 | public function outputShouldBe(PyStringNode $string) |
|
154 | { |
|
155 | $expected = $string->getStrings(); |
|
156 | foreach ($this->output as $index => $line) { |
|
157 | if ($line !== $expected[$index]) { |
|
158 | throw new \Exception(sprintf("instead of\n%s", implode("\n", $this->output))); |
|
159 | } |
|
160 | } |
|
161 | } |
|
162 | ||
163 | /** |