コード例 #1
0
 /**
  * Sets up this test case
  *
  * @author Robert Lemke <*****@*****.**>
  * @author Karsten Dambekalns <*****@*****.**>
  */
 public function setUp()
 {
     $this->mockObjectManager = $this->getMock('F3\\FLOW3\\Object\\ObjectManagerInterface');
     $this->mockObjectFactory = $this->getMock('F3\\FLOW3\\Object\\ObjectFactoryInterface');
     $this->mockReflectionService = $this->getMock('F3\\FLOW3\\Reflection\\ReflectionService');
     $this->mockReflectionService->expects($this->any())->method('getPropertyNamesByTag')->will($this->returnValue(array()));
     $this->objectBuilder = new \F3\FLOW3\Object\ObjectBuilder();
     $this->objectBuilder->injectObjectManager($this->mockObjectManager);
     $this->objectBuilder->injectObjectFactory($this->mockObjectFactory);
     $this->objectBuilder->injectReflectionService($this->mockReflectionService);
 }
コード例 #2
0
 /**
  * Initializes the Object ObjectManager and its collaborators
  *
  * @return void
  * @author Robert Lemke <*****@*****.**>
  */
 public function initializeManager()
 {
     $rawFLOW3ObjectConfigurations = $this->configurationManager->getConfiguration(\F3\FLOW3\Configuration\ConfigurationManager::CONFIGURATION_TYPE_OBJECTS, 'FLOW3');
     foreach ($rawFLOW3ObjectConfigurations as $objectName => $rawFLOW3ObjectConfiguration) {
         $this->setObjectConfiguration(\F3\FLOW3\Object\Configuration\ConfigurationBuilder::buildFromConfigurationArray($objectName, $rawFLOW3ObjectConfiguration, 'FLOW3 Object ObjectManager (pre-initialization)'));
     }
     $this->registerObject('F3\\FLOW3\\Object\\ObjectManagerInterface', __CLASS__, $this);
     $this->registerObject('F3\\FLOW3\\Object\\ObjectBuilder', get_class($this->objectBuilder), $this->objectBuilder);
     $this->registerObject('F3\\FLOW3\\Object\\ObjectFactoryInterface', get_class($this->objectFactory), $this->objectFactory);
     $this->registerObject('F3\\FLOW3\\Object\\RegistryInterface', get_class($this->singletonObjectsRegistry), $this->singletonObjectsRegistry);
     $this->objectBuilder->injectObjectManager($this);
     $this->objectBuilder->injectObjectFactory($this->objectFactory);
     $this->objectFactory->injectObjectManager($this);
     $this->objectFactory->injectObjectBuilder($this->objectBuilder);
 }