8000 Backport DI tag found in later branches · symfony/symfony@928bf70 · GitHub
[go: up one dir, main page]

Skip to content

Commit 928bf70

Browse files
committed
Backport DI tag found in later branches
1 parent f23ae10 commit 928bf70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Tests;
1313

14+
use Doctrine\Persistence\ObjectManager;
1415
use PHPUnit\Framework\TestCase;
1516
use ProxyManager\Proxy\LazyLoadingInterface;
1617
use ProxyManager\Proxy\ValueHolderInterface;
@@ -29,7 +30,7 @@ public static function setUpBeforeClass(): void
2930
$container = new ContainerBuilder();
3031

3132
$container->register('foo', DummyManager::class)->setPublic(true);
32-
$container->getDefinition('foo')->setLazy(true);
33+
$container->getDefinition('foo')->setLazy(true)->addTag('proxy', ['interface' => ObjectManager::class]);
3334
$container->compile();
3435

3536
$dumper = new PhpDumper($container);
@@ -51,7 +52,7 @@ public function testResetService()
5152
$registry->resetManager();
5253

5354
$this->assertSame($foo, $container->get('foo'));
54-
$this->assertInstanceOf(DummyManager::class, $foo);
55+
$this->assertInstanceOf(ObjectManager::class, $foo);
5556
$this->assertFalse(isset($foo->bar));
5657
}
5758

0 commit comments

Comments
 (0)
0