Skip to content

Commit 1c84733

Browse files
committed
Switch to ExpectUserDeprecationMessageTrait
1 parent 03d35ce commit 1c84733

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Loader;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
15+
use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait;
1616
use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
1717
use Symfony\Component\Config\Exception\LoaderLoadException;
1818
use Symfony\Component\Config\FileLocator;
@@ -49,7 +49,7 @@
4949

5050
class XmlFileLoaderTest extends TestCase
5151
{
52-
use ExpectDeprecationTrait;
52+
use ExpectUserDeprecationMessageTrait;
5353

5454
protected static string $fixturesPath;
5555

@@ -1340,7 +1340,7 @@ public function testDeprecatedTagged()
13401340
$container = new ContainerBuilder();
13411341
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
13421342

1343-
$this->expectDeprecation(\sprintf('Since symfony/dependency-injection 7.2: Type "tagged" is deprecated for tag <argument>, use "tagged_iterator" instead in "%s/xml%sservices_with_deprecated_tagged.xml".', self::$fixturesPath, \DIRECTORY_SEPARATOR));
1343+
$this->expectUserDeprecationMessage(\sprintf('Since symfony/dependency-injection 7.2: Type "tagged" is deprecated for tag <argument>, use "tagged_iterator" instead in "%s/xml%sservices_with_deprecated_tagged.xml".', self::$fixturesPath, \DIRECTORY_SEPARATOR));
13441344

13451345
$loader->load('services_with_deprecated_tagged.xml');
13461346
}

Tests/Loader/YamlFileLoaderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Loader;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
15+
use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait;
1616
use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
1717
use Symfony\Component\Config\Exception\LoaderLoadException;
1818
use Symfony\Component\Config\FileLocator;
@@ -48,7 +48,7 @@
4848

4949
class YamlFileLoaderTest extends TestCase
5050
{
51-
use ExpectDeprecationTrait;
51+
use ExpectUserDeprecationMessageTrait;
5252

5353
protected static string $fixturesPath;
5454

@@ -1211,7 +1211,7 @@ public function testDeprecatedTagged()
12111211
$container = new ContainerBuilder();
12121212
$loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml'));
12131213

1214-
$this->expectDeprecation(\sprintf('Since symfony/dependency-injection 7.2: Using "!tagged" is deprecated, use "!tagged_iterator" instead in "%s/yaml%stagged_deprecated.yml".', self::$fixturesPath, \DIRECTORY_SEPARATOR));
1214+
$this->expectUserDeprecationMessage(\sprintf('Since symfony/dependency-injection 7.2: Using "!tagged" is deprecated, use "!tagged_iterator" instead in "%s/yaml%stagged_deprecated.yml".', self::$fixturesPath, \DIRECTORY_SEPARATOR));
12151215

12161216
$loader->load('tagged_deprecated.yml');
12171217
}

0 commit comments

Comments
 (0)