Skip to content

Commit ce6bcb4

Browse files
committed
Use ExpectDeprecationTrait
1 parent ab0430d commit ce6bcb4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/Controller/ContainerControllerResolverTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,22 @@
1313

1414
use Psr\Container\ContainerInterface;
1515
use Psr\Log\LoggerInterface;
16+
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
1617
use Symfony\Component\DependencyInjection\Container;
1718
use Symfony\Component\HttpFoundation\Request;
1819
use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver;
1920

2021
class ContainerControllerResolverTest extends ControllerResolverTest
2122
{
23+
use ExpectDeprecationTrait;
24+
2225
/**
2326
* @group legacy
24-
* @expectedDeprecation Since symfony/http-kernel 5.1: Referencing controllers with a single colon is deprecated. Use "foo::action" instead.
2527
*/
2628
public function testGetControllerServiceWithSingleColon()
2729
{
30+
$this->expectDeprecation('Since symfony/http-kernel 5.1: Referencing controllers with a single colon is deprecated. Use "foo::action" instead.');
31+
2832
$service = new ControllerTestService('foo');
2933

3034
$container = $this->createMockContainer();

0 commit comments

Comments
 (0)