normalize($arguments[0]); $actual = $this->normalize($subject->getDisplay()); if (strpos($actual, $expected) === false) { throw new FailureException(sprintf( "Application output did not contain expected '%s'. Actual output:\n'%s'" , $expected, $subject->getDisplay() )); } } private function normalize($string) { $string = preg_replace('/\([0-9]+ms\)/', '', $string); return $string; } /** * Evaluates negative match. * * @param string $name * @param mixed $subject * @param array $arguments */ public function negativeMatch($name, $subject, array $arguments) { throw new FailureException('Negative application output matcher not implemented'); } /** * Returns matcher priority. * * @return integer */ public function getPriority() { return 51; } }