constraint = $constraint; $this->rethrow = $rethrow; } /** * @param mixed $actual * @return bool */ public function match(&$actual) { try { $this->constraint->evaluate($actual); return true; } catch (\PHPUnit_Framework_AssertionFailedError $e) { if ($this->rethrow) { throw $e; } return false; } catch (\PHPUnit\Framework\AssertionFailedError $e) { if ($this->rethrow) { throw $e; } return false; } } /** * */ public function __toString() { return ''; } }