Skip to content

Commit 8ba41fe

Browse files
bug #36408 [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions (soyuka)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | na | License | MIT | Doc PR | na expectExceptionMessageRegExp is deprecated coming phpunit 8.5.3 see sebastianbergmann/phpunit#4133 Not sure if I need to add something else lmk. Commits ------- cfd5a29eaf [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions
2 parents 81b4275 + d5b2113 commit 8ba41fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tests/Resource/DirectoryResourceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testGetPattern()
6666
public function testResourceDoesNotExist()
6767
{
6868
$this->expectException('InvalidArgumentException');
69-
$this->expectExceptionMessageRegExp('/The directory ".*" does not exist./');
69+
$this->expectExceptionMessageMatches('/The directory ".*" does not exist./');
7070
new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999));
7171
}
7272

Tests/Resource/FileResourceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testToString()
5656
public function testResourceDoesNotExist()
5757
{
5858
$this->expectException('InvalidArgumentException');
59-
$this->expectExceptionMessageRegExp('/The file ".*" does not exist./');
59+
$this->expectExceptionMessageMatches('/The file ".*" does not exist./');
6060
new FileResource('/____foo/foobar'.mt_rand(1, 999999));
6161
}
6262

0 commit comments

Comments
 (0)