public function canPostProcessRecord() { /** @var PageProvider|\PHPUnit_Framework_MockObject_MockObject $provider */ $provider = $this->getMock('FluidTYPO3\\Fluidpages\\Provider\\PageProvider', array('getForm', 'getInheritedPropertyValueByDottedPath')); $form = Form::create(); $form->createField('Input', 'settings.input')->setInherit(true); $record = $this->getBasicRecord(); $fieldName = $provider->getFieldName($record); $tableName = $provider->getTableName($record); $record[$fieldName] = Xml::EXPECTING_FLUX_REMOVALS; $id = $record['uid']; /** @var DataHandler $parentInstance */ $parentInstance = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'); $parentInstance->datamap[$tableName][$id] = array($fieldName => array('data' => array('options' => array('lDEF' => array('settings.input' => array('vDEF' => 'test'), 'settings.input_clear' => array('vDEF' => 1)))))); $provider->expects($this->any())->method('getForm')->willReturn($form); $provider->expects($this->once())->method('getInheritedPropertyValueByDottedPath')->with($parentInstance->datamap[$tableName][$id], 'settings.input')->willReturn('test'); /** @var WorkspacesAwareRecordService|\PHPUnit_Framework_MockObject_MockObject $recordService */ $recordService = $this->getMock('FluidTYPO3\\Flux\\Service\\WorkspacesAwareRecordService', array('getSingle', 'update')); $recordService->expects($this->atLeastOnce())->method('getSingle')->willReturn($parentInstance->datamap[$tableName][$id]); $recordService->expects($this->once())->method('update'); /** @var ConfigurationService|\PHPUnit_Framework_MockObject_MockObject $configurationService */ $configurationService = $this->getMock('FluidTYPO3\\Fluidpages\\Service\\ConfigurationService', array('message')); $configurationService->expects($this->any())->method('message'); $provider->injectRecordService($recordService); $provider->injectPageConfigurationService($configurationService); $provider->postProcessRecord('update', $id, $record, $parentInstance); $this->assertIsString($record[$fieldName]); $this->assertNotContains('settings.input', $record[$fieldName]); }