public function outputShouldContain($text)
{
$regex = '~' . $text . '~ui';
$check = false;
foreach ($this->output as $line) {
if (preg_match($regex, $line) === 1) {
$check = true;
break;
}
}
if ($check === false) {
throw new \Exception(sprintf("The text '%s' was not found anywhere on output of command.\n%s", $text, implode("\n", $this->output)));
}
}