FluidTYPO3\Flux\Tests\Unit\Backend\DynamicFlexFormTest::canExecuteDataStructurePostProcessHookInternal PHP Метод

canExecuteDataStructurePostProcessHookInternal() защищенный Метод

protected canExecuteDataStructurePostProcessHookInternal ( string $fieldName = 'pi_flexform', string $table = 'tt_content' ) : void
$fieldName string
$table string
Результат void
    protected function canExecuteDataStructurePostProcessHookInternal($fieldName = 'pi_flexform', $table = 'tt_content')
    {
        $dataStructure = array();
        $config = array();
        $row = array($fieldName => '');
        $instance = new DynamicFlexForm();
        $provider1 = $this->getMock('FluidTYPO3\\Flux\\Provider\\Provider', array('postProcessDataStructure'));
        $provider2 = $this->getMock('FluidTYPO3\\Flux\\Provider\\Provider', array('postProcessDataStructure'));
        $provider1->expects($this->any())->method('postProcessDataStructure');
        $provider2->expects($this->any())->method('postProcessDataStructure');
        $providers = array($provider1, $provider2);
        $service = $this->getMock('FluidTYPO3\\Flux\\Service\\FluxService', array('resolveConfigurationProviders'));
        $service->expects($this->any())->method('resolveConfigurationProviders')->with($table, $fieldName, $row)->willReturn($providers);
        $instance->injectConfigurationService($service);
        $instance->getFlexFormDS_postProcessDS($dataStructure, $config, $row, $table, $fieldName);
        $isArrayConstraint = new \PHPUnit_Framework_Constraint_IsType(\PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY);
        $this->assertThat($dataStructure, $isArrayConstraint);
    }