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

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

protected getMockProvider ( array $record, boolean $withGrid = TRUE ) : FluidTYPO3\Flux\Provider\Provider
$record array
$withGrid boolean
Результат FluidTYPO3\Flux\Provider\Provider
    protected function getMockProvider(array $record, $withGrid = TRUE)
    {
        $instance = $this->getMock('FluidTYPO3\\Flux\\Provider\\Provider', array('getViewVariables', 'getGrid'));
        if (FALSE === $withGrid) {
            $instance->expects($this->any())->method('getGrid')->willReturn(NULL);
        } else {
            $grid = Grid::create();
            $grid->createContainer('Row', 'row')->createContainer('Column', 'column')->setColumnPosition(1)->setVariable('Fluidcontent', array('deniedContentTypes' => 'html', 'allowedContentTypes' => 'text'));
            $instance->expects($this->any())->method('getGrid')->willReturn($grid);
        }
        return $instance;
    }