Skip to content

Commit a1758c9

Browse files
MNT Don't fail test for unrelated line number change (#11916)
symfony/yaml changed which line it thinks the error is on - arguably the change is wrong, but arguably the line number was already wrong anyway (the actual error is on line 4, but we used to expect line 5, and it changed to reporting line 6). We shouldn't care what line symfony is reporting about - what really matters is that the error we expect is the error that is thrown.
1 parent 3750ed3 commit a1758c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/php/i18n/YamlReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testThrowsMeaningfulExceptionWhenYmlIsCorrupted()
4343
$path = __DIR__ . '/i18nTest/_fakewebroot/i18ntestmodule/lang/en_corrupt.yml';
4444
$this->expectException(InvalidResourceException::class);
4545
$regex_path = str_replace('.', '\.', $path ?? '');
46-
$this->expectExceptionMessageMatches('@^Error parsing YAML, invalid file "' . $regex_path . '"\. Message: ([\w ].*) line 5 @');
46+
$this->expectExceptionMessageMatches('@^Error parsing YAML, invalid file "' . $regex_path . '"\. Message: ([\w ].*) line \d@');
4747
$reader = new YamlReader();
4848
$reader->read('en', $path);
4949
}

0 commit comments

Comments
 (0)