Ejemplo n.º 1
0
 /**
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function setUp()
 {
     $this->simpleValueArgument = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('dummy'), array('someName', 'string'));
     $this->objectArgument = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('dummy'), array('someName', 'DateTime'));
     $this->mockPropertyMapper = $this->getMock('TYPO3\\CMS\\Extbase\\Property\\PropertyMapper');
     $this->simpleValueArgument->_set('propertyMapper', $this->mockPropertyMapper);
     $this->objectArgument->_set('propertyMapper', $this->mockPropertyMapper);
     $this->mockConfiguration = new \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration();
     $propertyMappingConfiguranion = new \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration();
     $this->simpleValueArgument->_set('propertyMappingConfiguration', $propertyMappingConfiguranion);
     $this->objectArgument->_set('propertyMappingConfiguration', $propertyMappingConfiguranion);
 }
 /**
  * Helper which enables the deprecated property mapper in the Argument class.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\Controller\Argument $argument
  */
 protected function enableDeprecatedPropertyMapperInArgument(\TYPO3\CMS\Extbase\Mvc\Controller\Argument $argument)
 {
     $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
     $mockConfigurationManager->expects($this->any())->method('isFeatureEnabled')->with('rewrittenPropertyMapper')->will($this->returnValue(FALSE));
     $argument->_set('configurationManager', $mockConfigurationManager);
 }