FluidTYPO3\Fluidcontent\Tests\Unit\Provider\WizardItemsHookSubscriberTest::testManipulateWizardItemsCallsExpectedMethodSequenceWithoutProviders PHP Метод

testManipulateWizardItemsCallsExpectedMethodSequenceWithoutProviders() публичный Метод

    public function testManipulateWizardItemsCallsExpectedMethodSequenceWithoutProviders()
    {
        $GLOBALS['BE_USER'] = new BackendUserAuthentication();
        /** @var WizardItemsHookSubscriber $instance */
        $instance = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('FluidTYPO3\\Fluidcontent\\Hooks\\WizardItemsHookSubscriber');
        /** @var ConfigurationService|\PHPUnit_Framework_MockObject_MockObject $configurationService */
        $configurationService = $this->getMock('FluidTYPO3\\Fluidcontent\\Service\\ConfigurationService', array('writeCachedConfigurationIfMissing', 'resolveConfigurationProviders'));
        /** @var WorkspacesAwareRecordService|\PHPUnit_Framework_MockObject_MockObject $recordService */
        $recordService = $this->getMock('FluidTYPO3\\Flux\\Service\\WorkspacesAwareRecordService', array('getSingle'));
        $configurationService->expects($this->once())->method('writeCachedConfigurationIfMissing');
        $configurationService->expects($this->once())->method('resolveConfigurationProviders')->willReturn(array());
        $recordService->expects($this->once())->method('getSingle')->willReturn(NULL);
        $instance->injectConfigurationService($configurationService);
        $instance->injectRecordService($recordService);
        $parent = $this->getMock(NewContentElementController::class, array('init'), array(), '', FALSE);
        $items = array();
        $instance->manipulateWizardItems($items, $parent);
    }