Skip to content

Commit 89e0508

Browse files
committed
Fix test to account for message changes between Symfony versions
1 parent 038e0a8 commit 89e0508

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/PhpUnit/ConfigurationTestCaseTraitTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ public function it_can_assert_that_a_configuration_is_valid()
6262
public function it_fails_when_a_configuration_is_invalid_when_it_should_have_been_valid()
6363
{
6464
$this->expectException(ExpectationFailedException::class);
65-
$this->expectExceptionMessage('The child node "required_value" at path "root" must be configured.');
65+
66+
if (method_exists($this, 'expectExceptionMessageMatches')) {
67+
$this->expectExceptionMessageMatches('/^The child (config|node) "required_value" (at path|under) "root" must be configured/');
68+
} else {
69+
$this->expectExceptionMessageRegExp('/^The child (config|node) "required_value" (at path|under) "root" must be configured/');
70+
}
6671

6772
$this->assertConfigurationIsValid(
6873
[

0 commit comments

Comments
 (0)