Skip to content

Commit 538d4ce

Browse files
Revert "Make ExceptionMessage strict"
This reverts commit 8f3e96f.
1 parent 0e71b9b commit 538d4ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Framework/Constraint/ExceptionMessage.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ public function __construct($expected)
3636
*/
3737
protected function matches($other)
3838
{
39-
return $other->getMessage() === $this->expectedMessage;
39+
if ($this->expectedMessage === '') {
40+
return $other->getMessage() === '';
41+
}
42+
43+
return \strpos($other->getMessage(), $this->expectedMessage) !== false;
4044
}
4145

4246
/**

0 commit comments

Comments
 (0)