Skip to content

Commit b10c9cb

Browse files
soyukanicolas-grekas
authored andcommitted
[PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions
1 parent ed8bd70 commit b10c9cb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public function testLoadRouteWithControllerSetInDefaults()
439439
public function testOverrideControllerInDefaults()
440440
{
441441
$this->expectException('InvalidArgumentException');
442-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for "app_blog"/');
442+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for "app_blog"/');
443443
$loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
444444
$loader->load('override_defaults.xml');
445445
}
@@ -471,7 +471,7 @@ public function provideFilesImportingRoutesWithControllers()
471471
public function testImportWithOverriddenController()
472472
{
473473
$this->expectException('InvalidArgumentException');
474-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for the "import" tag/');
474+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for the "import" tag/');
475475
$loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
476476
$loader->load('import_override_defaults.xml');
477477
}

Tests/Loader/YamlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function testLoadRouteWithControllerSetInDefaults()
144144
public function testOverrideControllerInDefaults()
145145
{
146146
$this->expectException('InvalidArgumentException');
147-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "app_blog"/');
147+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "app_blog"/');
148148
$loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
149149
$loader->load('override_defaults.yml');
150150
}
@@ -176,7 +176,7 @@ public function provideFilesImportingRoutesWithControllers()
176176
public function testImportWithOverriddenController()
177177
{
178178
$this->expectException('InvalidArgumentException');
179-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "_static"/');
179+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "_static"/');
180180
$loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
181181
$loader->load('import_override_defaults.yml');
182182
}

0 commit comments

Comments
 (0)