This repository was archived by the owner on Feb 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,9 @@ public function create(ContainerInterface $container): ContainerInterface
2424 {
2525 return new ThreadContainerProxy ($ container , $ this ->proxy );
2626 }
27+
28+ public function proxy (): ContainerInterface
29+ {
30+ return $ this ->proxy ;
31+ }
2732}
Original file line number Diff line number Diff line change 66
77use React \EventLoop \Factory as EventLoopFactory ;
88use ReactParallel \Factory ;
9+ use ReactParallel \ObjectProxy \Generated \Psr__Container_ContainerInterfaceProxy ;
910use ReactParallel \ObjectProxy \Proxy ;
1011use ReactParallel \Psr11ContainerProxy \ContainerProxy ;
1112use ReactParallel \Psr11ContainerProxy \ThreadContainerProxy ;
@@ -26,4 +27,17 @@ public function create(): void
2627
2728 self ::assertInstanceOf (ThreadContainerProxy::class, $ containerProxy ->create (new Container ()));
2829 }
30+
31+ /**
32+ * @test
33+ */
34+ public function proxy (): void
35+ {
36+ $ loop = EventLoopFactory::create ();
37+ $ factory = new Factory ($ loop );
38+ $ proxy = new Proxy ($ factory );
39+ $ containerProxy = new ContainerProxy (new Container (), $ proxy );
40+
41+ self ::assertInstanceOf (Psr__Container_ContainerInterfaceProxy::class, $ containerProxy ->proxy ());
42+ }
2943}
You can’t perform that action at this time.
0 commit comments