14
14
use PHPUnit \Framework \TestCase ;
15
15
use ProxyManager \Proxy \LazyLoadingInterface ;
16
16
use ProxyManager \Proxy \ValueHolderInterface ;
17
+ use Symfony \Bridge \Doctrine \Tests \Fixtures \DummyManager ;
17
18
use Symfony \Bridge \ProxyManager \LazyProxy \PhpDumper \ProxyDumper ;
18
19
use Symfony \Bridge \ProxyManager \Tests \LazyProxy \Dumper \PhpDumperTest ;
19
20
use Symfony \Component \DependencyInjection \ContainerBuilder ;
@@ -47,8 +48,8 @@ public function testResetService()
47
48
$ registry ->resetManager ();
48
49
49
50
$ 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 ));
52
53
}
53
54
54
55
/**
@@ -80,7 +81,7 @@ public function testResetServiceWillNotNestFurtherLazyServicesWithinEachOther()
80
81
81
82
$ service = $ container ->get ('foo ' );
82
83
83
- self ::assertInstanceOf (\stdClass ::class, $ service );
84
+ self ::assertInstanceOf (DummyManager ::class, $ service );
84
85
self ::assertInstanceOf (LazyLoadingInterface::class, $ service );
85
86
self ::assertInstanceOf (ValueHolderInterface::class, $ service );
86
87
self ::assertFalse ($ service ->isProxyInitialized ());
@@ -94,7 +95,7 @@ public function testResetServiceWillNotNestFurtherLazyServicesWithinEachOther()
94
95
$ service ->initializeProxy ();
95
96
96
97
$ wrappedValue = $ service ->getWrappedValueHolderValue ();
97
- self ::assertInstanceOf (\stdClass ::class, $ wrappedValue );
98
+ self ::assertInstanceOf (DummyManager ::class, $ wrappedValue );
98
99
self ::assertNotInstanceOf (LazyLoadingInterface::class, $ wrappedValue );
99
100
self ::assertNotInstanceOf (ValueHolderInterface::class, $ wrappedValue );
100
101
}
@@ -107,7 +108,7 @@ private function dumpLazyServiceProjectAsFilesServiceContainer()
107
108
108
109
$ container = new ContainerBuilder ();
109
110
110
- $ container ->register ('foo ' , \stdClass ::class)
111
+ $ container ->register ('foo ' , DummyManager ::class)
111
112
->setPublic (true )
112
113
->setLazy (true );
113
114
$ container ->compile ();
0 commit comments