Esempio n. 1
0
 public function testInstantiateWithConcreteClassDependency()
 {
     $ioc = new IocImpl();
     $b = new B();
     $ioc->register($b, ["registerClass" => true]);
     $a = $ioc->instantiate(DependentA_ConcreteB::class);
     $this->assertInstanceOf(DependentA_ConcreteB::class, $a);
     $this->assertSame($b, $a->getB());
 }