public function processesWizardItems($items, $whitelist, $blacklist, $expectedList)
{
$GLOBALS['LOCAL_LANG'] = new \stdClass();
$GLOBALS['BE_USER'] = new BackendUserAuthentication();
$objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
/** @var WizardItemsHookSubscriber $instance */
$instance = $objectManager->get('FluidTYPO3\\Fluidcontent\\Hooks\\WizardItemsHookSubscriber');
$emulatedPageAndContentRecord = array('uid' => 1, 'tx_flux_column' => 'name');
$controller = $this->getMock(NewContentElementController::class, array('init'), array(), '', FALSE);
$controller->colPos = 0;
$controller->uid_pid = -1;
$grid = new Grid();
$row = new Row();
$column = new Column();
$column->setColumnPosition(0);
$column->setName('name');
$column->setVariable('Fluidcontent', array('allowedContentTypes' => $whitelist, 'deniedContentTypes' => $blacklist));
$row->add($column);
$grid->add($row);
/** @var Provider $provider1 */
$provider1 = $objectManager->get('FluidTYPO3\\Flux\\Provider\\Provider');
$provider1->setTemplatePaths(array());
$provider1->setTemplateVariables(array());
$provider1->setGrid($grid);
$provider2 = $this->getMock('FluidTYPO3\\Flux\\Provider\\Provider', array('getGrid'));
$provider2->expects($this->exactly(1))->method('getGrid')->will($this->returnValue(NULL));
/** @var ConfigurationService|\PHPUnit_Framework_MockObject_MockObject $configurationService */
$configurationService = $this->getMock('FluidTYPO3\\Fluidcontent\\Service\\ConfigurationService', array('resolveConfigurationProviders', 'writeCachedConfigurationIfMissing'));
$configurationService->expects($this->exactly(1))->method('resolveConfigurationProviders')->will($this->returnValue(array($provider1, $provider2)));
/** @var WorkspacesAwareRecordService|\PHPUnit_Framework_MockObject_MockObject $recordService */
$recordService = $this->getMock('FluidTYPO3\\Flux\\Service\\WorkspacesAwareRecordService', array('getSingle'));
$recordService->expects($this->exactly(2))->method('getSingle')->will($this->returnValue($emulatedPageAndContentRecord));
$instance->injectConfigurationService($configurationService);
$instance->injectRecordService($recordService);
$instance->manipulateWizardItems($items, $controller);
$this->assertEquals($expectedList, $items);
}