Skip to content

Commit 6f96698

Browse files
committed
Composer: raise minimum PHPUnit 8 version to 8.4.0
... to allow for a simplification in the test suite.
1 parent 621bfa5 commit 6f96698

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"ext-xmlwriter": "*"
3737
},
3838
"require-dev": {
39-
"phpunit/phpunit": "^8.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31"
39+
"phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31"
4040
},
4141
"bin": [
4242
"bin/phpcbf",

tests/Core/Ruleset/AbstractRulesetTestCase.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,15 @@ protected function expectRuntimeExceptionMessage($message)
7373

7474

7575
/**
76-
* Helper method to tell PHPUnit to expect a PHPCS RuntimeException which matches a regex patten
77-
* in a PHPUnit cross-version compatible manner.
76+
* Helper method to tell PHPUnit to expect a PHPCS RuntimeException which matches a regex pattern.
7877
*
7978
* @param string $regex The regex which should match.
8079
*
8180
* @return void
8281
*/
8382
protected function expectRuntimeExceptionRegex($regex)
8483
{
85-
if (method_exists($this, 'expectExceptionMessageMatches') === true) {
86-
$this->expectException(RuntimeException::class);
87-
$this->expectExceptionMessageMatches($regex);
88-
} else {
89-
// PHPUnit < 8.4.0.
90-
$this->expectException(RuntimeException::class);
91-
$this->expectExceptionMessageRegExp($regex);
92-
}
84+
$this->expectException(RuntimeException::class);
85+
$this->expectExceptionMessageMatches($regex);
9386
}
9487
}

0 commit comments

Comments
 (0)