FluidTYPO3\Flux\Tests\Unit\Backend\TceMainTest::executeConfigurationProviderMethodCallsMethodOnProvidersAndTracksExecution PHP Method

executeConfigurationProviderMethodCallsMethodOnProvidersAndTracksExecution() public method

    public function executeConfigurationProviderMethodCallsMethodOnProvidersAndTracksExecution()
    {
        $command = 'postProcessDatabaseOperation';
        $mock = $this->getMock($this->createInstanceClassName(), array('resolveRecordUid', 'ensureRecordDataIsLoaded'));
        $mock->expects($this->once())->method('resolveRecordUid')->willReturn(1);
        $mock->expects($this->once())->method('ensureRecordDataISLoaded')->willReturnArgument(2);
        $caller = $this->getCallerInstance();
        $row = array('uid' => 1);
        $arguments = array('status' => $command, 'id' => 1, 'row' => $row);
        $provider = $this->getMock('FluidTYPO3\\Flux\\Provider\\Provider', array($command));
        $provider->expects($this->exactly(1))->method($command);
        $providers = array($provider, $provider);
        $configurationService = $this->getMock('FluidTYPO3\\Flux\\Service\\FluxService', array('resolveConfigurationProviders'));
        $configurationService->expects($this->once())->method('resolveConfigurationProviders')->willReturn($providers);
        $mock->injectConfigurationService($configurationService);
        $result = $this->callInaccessibleMethod($mock, 'executeConfigurationProviderMethod', $command, 'void', 1, 'command', $row, $arguments, $caller);
        $this->assertEquals($row, $result);
    }