Example #1
0
 /**
  * Initializes the Reflection Service
  *
  * @return void
  * @see initialize()
  */
 protected function initializeReflection()
 {
     $this->reflectionService = $this->objectManager->get('Tx_Extbase_Reflection_Service');
     $this->reflectionService->setDataCache($this->cacheManager->getCache('cache_extbase_reflection'));
     if (!$this->reflectionService->isInitialized()) {
         $this->reflectionService->initialize();
     }
 }
 /**
  * @test
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function prepareArgumentsRegistersAnnotationBasedArgumentsWithoutDescriptionIfDebugModeIsDisabled()
 {
     $this->markTestIncomplete("Works differently in v4.");
     Tx_Fluid_Fluid::$debugMode = FALSE;
     $availableClassNames = array('Tx_Fluid_Core_Fixtures_TestViewHelper');
     $reflectionService = new Tx_Extbase_Reflection_Service();
     $reflectionService->setStatusCache($this->getMock('Tx_Fluid_Cache_Frontend_StringFrontend', array(), array(), '', FALSE));
     $reflectionService->setDataCache($this->getMock('Tx_Fluid_Cache_Frontend_VariableFrontend', array(), array(), '', FALSE));
     // $reflectionService->initialize($availableClassNames);
     $viewHelper = new Tx_Fluid_Core_Fixtures_TestViewHelper();
     $viewHelper->injectReflectionService($reflectionService);
     $expected = array('param1' => new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('param1', 'integer', '', TRUE, null, TRUE), 'param2' => new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('param2', 'array', '', TRUE, null, TRUE), 'param3' => new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('param3', 'string', '', FALSE, 'default', TRUE));
     $this->assertEquals($expected, $viewHelper->prepareArguments(), 'Annotation based arguments were not registered.');
 }