FluidTYPO3\Flux\Tests\Unit\ViewHelpers\AbstractFormViewHelperTestCase::canGetGridWhenItExistInStorage PHP Method

canGetGridWhenItExistInStorage() public method

    public function canGetGridWhenItExistInStorage()
    {
        $form = Form::create();
        $grid = Form\Container\Grid::create();
        $grid->setName('test');
        $grids = array('test' => $grid);
        $instance = $this->createMockedInstanceForVariableContainerTests(array('getForm'));
        $instance->expects($this->any())->method('getForm')->will($this->returnValue($form));
        $this->viewHelperVariableContainer->expects($this->any())->method('exists')->will($this->returnValue(TRUE));
        $this->viewHelperVariableContainer->expects($this->any())->method('get')->will($this->returnValue($grids));
        $output = $this->callInaccessibleMethod($instance, 'getGrid', 'test');
        $this->assertSame($grid, $output);
    }