Skip to content

Commit

Permalink
bug #36408 [PhpUnitBridge] add PolyfillTestCaseTrait::expectException…
Browse files Browse the repository at this point in the history
…MessageMatches 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
  • Loading branch information
nicolas-grekas committed Apr 15, 2020
2 parents da2c21a + 14c243a commit 49115b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/Extension/Core/Type/CheckboxTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function provideCustomFalseValues()
public function testDontAllowNonArrayFalseValues()
{
$this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException');
$this->expectExceptionMessageRegExp('/"false_values" with value "invalid" is expected to be of type "array"/');
$this->expectExceptionMessageMatches('/"false_values" with value "invalid" is expected to be of type "array"/');
$this->factory->create(static::TESTED_TYPE, null, [
'false_values' => 'invalid',
]);
Expand Down

0 comments on commit 49115b7

Please sign in to comment.