@@ -602,7 +602,7 @@ public function testShortcutKeyUnindentedCollectionException()
602602 public function testMultipleDocumentsNotSupportedException ()
603603 {
604604 $ this ->expectException ('Symfony\Component\Yaml\Exception\ParseException ' );
605- $ this ->expectExceptionMessageRegExp ('/^Multiple documents are not supported.+/ ' );
605+ $ this ->expectExceptionMessageMatches ('/^Multiple documents are not supported.+/ ' );
606606 Yaml::parse (<<<'EOL'
607607# Ranking of 1998 home runs
608608---
@@ -1348,7 +1348,7 @@ public function getBinaryData()
13481348 public function testParseInvalidBinaryData ($ data , $ expectedMessage )
13491349 {
13501350 $ this ->expectException ('Symfony\Component\Yaml\Exception\ParseException ' );
1351- $ this ->expectExceptionMessageRegExp ($ expectedMessage );
1351+ $ this ->expectExceptionMessageMatches ($ expectedMessage );
13521352
13531353 $ this ->parser ->parse ($ data );
13541354 }
@@ -2102,14 +2102,14 @@ public function testParseFile()
21022102 public function testParsingNonExistentFilesThrowsException ()
21032103 {
21042104 $ this ->expectException ('Symfony\Component\Yaml\Exception\ParseException ' );
2105- $ this ->expectExceptionMessageRegExp ('#^File ".+/Fixtures/nonexistent.yml" does not exist\.$# ' );
2105+ $ this ->expectExceptionMessageMatches ('#^File ".+/Fixtures/nonexistent.yml" does not exist\.$# ' );
21062106 $ this ->parser ->parseFile (__DIR__ .'/Fixtures/nonexistent.yml ' );
21072107 }
21082108
21092109 public function testParsingNotReadableFilesThrowsException ()
21102110 {
21112111 $ this ->expectException ('Symfony\Component\Yaml\Exception\ParseException ' );
2112- $ this ->expectExceptionMessageRegExp ('#^File ".+/Fixtures/not_readable.yml" cannot be read\.$# ' );
2112+ $ this ->expectExceptionMessageMatches ('#^File ".+/Fixtures/not_readable.yml" cannot be read\.$# ' );
21132113 if ('\\' === \DIRECTORY_SEPARATOR ) {
21142114 $ this ->markTestSkipped ('chmod is not supported on Windows ' );
21152115 }
0 commit comments