8000 [FrameworkBundle] fix tests · symfony/symfony@e7a5c9a · GitHub
[go: up one dir, main page]

Skip to content

Commit e7a5c9a

Browse files
committed
[FrameworkBundle] fix tests
1 parent 6178664 commit e7a5c9a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public function testGetControllerOnContainerAware()
3333
{
3434
$resolver = $this->createControllerResolver();
3535
$request = Request::create('/');
36-
$request->attributes->set('_controller', 'Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController::testAction');
36+
$request->attributes->set('_controller', sprintf('%s::testAction', ContainerAwareController::class));
3737

38-
$this->expectDeprecation('Since symfony/dependency-injection 6.4: Relying on "Symfony\Component\DependencyInjection\ContainerAwareInterface" to get the container in "Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController" is deprecated, register the controller as a service and use dependency injection instead.');
38+
$this->expectDeprecation(sprintf('Since symfony/dependency-injection 6.4: Relying on "Symfony\Component\DependencyInjection\ContainerAwareInterface" to get the container in "%s" is deprecated, register the controller as a service and use dependency injection instead.', ContainerAwareController::class));
3939
$controller = $resolver->getController($request);
4040

4141
$this->assertInstanceOf(ContainerAwareController::class, $controller[0]);
@@ -50,9 +50,9 @@ public function testGetControllerOnContainerAwareInvokable()
5050
{
5151
$resolver = $this->createControllerResolver();
5252
$request = Request::create('/');
53-
$request->attributes->set('_controller', 'Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController');
53+
$request->attributes->set('_controller', ContainerAwareController::class);
5454

55-
$this->expectDeprecation('Since symfony/dependency-injection 6.4: Relying on "Symfony\Component\DependencyInjection\ContainerAwareInterface" to get the container in "Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController" is deprecated, register the controller as a service and use dependency injection instead.');
55+
$this->expectDeprecation(sprintf('Since symfony/dependency-injection 6.4: Relying on "Symfony\Component\DependencyInjection\ContainerAwareInterface" to get the container in "%s" is deprecated, register the controller as a service and use dependency injection instead.', ContainerAwareController::class));
5656
$controller = $resolver->getController($request);
5757

5858
$this->assertInstanceOf(ContainerAwareController::class, $controller);
@@ -76,7 +76,7 @@ class_exists(AbstractControllerTest::class);
7676
$request = Request::create('/');
7777
$request->attributes->set('_controller', TestAbstractController::class.'::testAction');
7878

79-
$this->expectDeprecation('Since symfony/dependency-injection 6.4: Relying on "Symfony\Component\DependencyInjection\ContainerAwareInterface" to get the container in "Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController" is deprecated, register the controller as a service and use dependency injection instead.');
79+
$this->expectDeprecation(sprintf('Since symfony/dependency-injection 6.4: Relying on "Symfony\Component\DependencyInjection\ContainerAwareInterface" to get the container in "%s" is deprecated, register the controller as a service and use dependency injection instead.', ContainerAwareController::class));
8080
$this->assertSame([$controller, 'testAction'], $resolver->getController($request));
8181
$this->assertSame($container, $controller->getContainer());
8282
}

0 commit comments

Comments
 (0)
0