Skip to content

Commit 58381b7

Browse files
committed
Fix PHPUnit 8.5 deprecations.
1 parent e0d43b6 commit 58381b7

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
@@ -339,7 +339,7 @@ public function testLoadRouteWithControllerSetInDefaults()
339339
public function testOverrideControllerInDefaults()
340340
{
341341
$this->expectException('InvalidArgumentException');
342-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for "app_blog"/');
342+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for "app_blog"/');
343343
$loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
344344
$loader->load('override_defaults.xml');
345345
}
@@ -371,7 +371,7 @@ public function provideFilesImportingRoutesWithControllers()
371371
public function testImportWithOverriddenController()
372372
{
373373
$this->expectException('InvalidArgumentException');
374-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for the "import" tag/');
374+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" attribute and the defaults key "_controller" for the "import" tag/');
375375
$loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
376376
$loader->load('import_override_defaults.xml');
377377
}

Tests/Loader/YamlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function testLoadRouteWithControllerSetInDefaults()
142142
public function testOverrideControllerInDefaults()
143143
{
144144
$this->expectException('InvalidArgumentException');
145-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "app_blog"/');
145+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "app_blog"/');
146146
$loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
147147
$loader->load('override_defaults.yml');
148148
}
@@ -174,7 +174,7 @@ public function provideFilesImportingRoutesWithControllers()
174174
public function testImportWithOverriddenController()
175175
{
176176
$this->expectException('InvalidArgumentException');
177-
$this->expectExceptionMessageRegExp('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "_static"/');
177+
$this->expectExceptionMessageMatches('/The routing file "[^"]*" must not specify both the "controller" key and the defaults key "_controller" for "_static"/');
178178
$loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
179179
$loader->load('import_override_defaults.yml');
180180
}

0 commit comments

Comments
 (0)