1414use PHPUnit \Framework \TestCase ;
1515use ProxyManager \Proxy \LazyLoadingInterface ;
1616use ProxyManager \Proxy \ValueHolderInterface ;
17+ use Symfony \Bridge \Doctrine \Tests \Fixtures \DummyManager ;
1718use Symfony \Bridge \ProxyManager \LazyProxy \PhpDumper \ProxyDumper ;
1819use Symfony \Bridge \ProxyManager \Tests \LazyProxy \Dumper \PhpDumperTest ;
1920use Symfony \Component \DependencyInjection \ContainerBuilder ;
@@ -47,8 +48,8 @@ public function testResetService()
4748 $ registry ->resetManager ();
4849
4950 $ this ->assertSame ($ foo , $ container ->get ('foo ' ));
50- $ this ->assertInstanceOf (\stdClass ::class, $ foo );
51- $ this ->assertFalse (property_exists ($ foo, ' bar ' ));
51+ $ this ->assertInstanceOf (DummyManager ::class, $ foo );
52+ $ this ->assertFalse (isset ($ foo-> bar ));
5253 }
5354
5455 /**
@@ -80,7 +81,7 @@ public function testResetServiceWillNotNestFurtherLazyServicesWithinEachOther()
8081
8182 $ service = $ container ->get ('foo ' );
8283
83- self ::assertInstanceOf (\stdClass ::class, $ service );
84+ self ::assertInstanceOf (DummyManager ::class, $ service );
8485 self ::assertInstanceOf (LazyLoadingInterface::class, $ service );
8586 self ::assertInstanceOf (ValueHolderInterface::class, $ service );
8687 self ::assertFalse ($ service ->isProxyInitialized ());
@@ -94,7 +95,7 @@ public function testResetServiceWillNotNestFurtherLazyServicesWithinEachOther()
9495 $ service ->initializeProxy ();
9596
9697 $ wrappedValue = $ service ->getWrappedValueHolderValue ();
97- self ::assertInstanceOf (\stdClass ::class, $ wrappedValue );
98+ self ::assertInstanceOf (DummyManager ::class, $ wrappedValue );
9899 self ::assertNotInstanceOf (LazyLoadingInterface::class, $ wrappedValue );
99100 self ::assertNotInstanceOf (ValueHolderInterface::class, $ wrappedValue );
100101 }
@@ -107,7 +108,7 @@ private function dumpLazyServiceProjectAsFilesServiceContainer()
107108
108109 $ container = new ContainerBuilder ();
109110
110- $ container ->register ('foo ' , \stdClass ::class)
111+ $ container ->register ('foo ' , DummyManager ::class)
111112 ->setPublic (true )
112113 ->setLazy (true );
113114 $ container ->compile ();
0 commit comments