public function setup() { $this->container = new InjectorFactoryContainer(); $this->container->addConstructor(new Constructor('objectA', 'ConstructorTest_a', true)); $this->container->addConstructor(new Constructor('objectB', 'ConstructorTest_b', false)); #$this->container->registerConstructor('objectA', 'ConstructorTest_a', true); #$this->container->registerConstructor('objectB', 'ConstructorTest_b', false); $constructorC = new Constructor('objectC', 'ConstructorTest_c'); $constructorC->addParameter(new Fixed('testProperty', 'c')); $this->container->addConstructor($constructorC); $constructorC = new Constructor('objectD', 'ConstructorTest_d'); $constructorC->addParameter(new Container('testProperty', 'testPropertyForD')); $this->container->set('testPropertyForD', 'd'); $this->container->addConstructor($constructorC); $this->container->addConstructor(new Constructor('objectE', 'ConstructorTest_e')); $this->container->addConstructor(new Constructor('objectF', 'ConstructorTest_f')); $this->container->addConstructor(new Constructor('objectG', 'ConstructorTest_g')); $this->container->addConstructor(new Constructor('view/', 'View__')); $constructorI = new Constructor('objectI', 'ConstructorTest_i'); $constructorI->addPostInstantiationClosure(function ($object, $container) { $object->setPropertyA(1); $object->setPropertyB(2); }); $this->container->addConstructor($constructorI); }