public function AssertOutputNotMatches($pattern, $message = '') { $actual = ob_get_contents(); $actual = ob_get_contents(); if ('string' != gettype($pattern)) { $this->testCaseResults->AddDetail(EventType::ERROR(), 'AssertOutputNotMatches: Expected need to be a string.', $message, $actual, $pattern); return; } $match = preg_match($pattern, $actual); $this->testCaseResults->AddDetail($match > 0 ? EventType::FAIL() : EventType::PASS(), 'AssertOutputNotMatches: ' . $match . ' matches found.', $message, $actual, $pattern); }