class ManagerRegistryTest extends TestCase
{ public static function setUpBeforeClass(): void
{ $container =
new ContainerBuilder();
$container->
register('foo', \stdClass::
class)->
setPublic(true
);
$container->
getDefinition('foo'
)->
setLazy(true
)->
addTag('proxy',
['interface' => \stdClass::
class]);
$container->
compile();
$dumper =
new PhpDumper($container);
eval('?>'.
$dumper->
dump(['class' => 'LazyServiceDoctrineBridgeContainer'
]));
} public function testResetService() { $container =
new \
LazyServiceDoctrineBridgeContainer();
$registry =
new TestManagerRegistry('name',
[],
['defaultManager' => 'foo'
], 'defaultConnection', 'defaultManager', 'proxyInterfaceName'
);
$registry->
setTestContainer($container);
$foo =
$container->
get('foo'
);
$foo->bar = 123;