Skip to content

Commit

Permalink
expectExceptionMessageRegExp() is deprecated in PHPUnit 8 and will be…
Browse files Browse the repository at this point in the history
… removed in PHPUnit 9. Use expectExceptionMessageMatches() instead.
  • Loading branch information
Kaloyan (KT) Tsvetkov committed Mar 9, 2024
1 parent 5651905 commit ce1059e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/Masked/ProtectHideValuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function test_hideValue_object()
function test_hideValue_other()
{
$this->expectException(Warning::class);
$this->expectExceptionMessageRegExp(
$this->expectExceptionMessageMatches(
'~^Fuko\\\\Masked\\\\Protect\:\:hideValue\(\) received unexpected type \(Resource id #\d+\) as a hide value$~'
);

Expand Down Expand Up @@ -176,7 +176,7 @@ function test_hideValues_withObject()
function test_hideValues_withOther()
{
$this->expectException(Warning::class);
$this->expectExceptionMessageRegExp(
$this->expectExceptionMessageMatches(
'~^Fuko\\\\Masked\\\\Protect\:\:hideValues\(\) received unexpected type \(Resource id #\d+\) as a hide value \(key "0" of the \$values argument\)$~'
);

Expand Down
2 changes: 1 addition & 1 deletion tests/Masked/ValueCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function testHideException()
function testHideFileHandler()
{
$this->expectException(Warning::class);
$this->expectExceptionMessageRegExp(
$this->expectExceptionMessageMatches(
'~^Fuko\\\\Masked\\\\Protect\:\:hideValue\(\) received unexpected type \(Resource id #\d+\) as a hide value$~'
);

Expand Down

0 comments on commit ce1059e

Please sign in to comment.