Skip to content

Commit

Permalink
Revert "Make ExceptionMessage strict"
Browse files Browse the repository at this point in the history
This reverts commit 8f3e96f.
  • Loading branch information
sebastianbergmann committed Oct 10, 2018
1 parent 0e71b9b commit 538d4ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Framework/Constraint/ExceptionMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public function __construct($expected)
*/
protected function matches($other)
{
return $other->getMessage() === $this->expectedMessage;
if ($this->expectedMessage === '') {
return $other->getMessage() === '';
}

return \strpos($other->getMessage(), $this->expectedMessage) !== false;
}

/**
Expand Down

0 comments on commit 538d4ce

Please sign in to comment.