FluidTYPO3\Fluidpages\Tests\Unit\Backend\BackendLayoutDataProviderTest::testGetBackendLayout PHP Method

testGetBackendLayout() public method

public testGetBackendLayout ( ) : void
return void
    public function testGetBackendLayout()
    {
        /** @var BackendLayoutDataProvider|\PHPUnit_Framework_MockObject_MockObject $instance */
        $instance = $this->getMock('FluidTYPO3\\Fluidpages\\Backend\\BackendLayoutDataProvider', array('getBackendLayoutConfiguration', 'ensureDottedKeys', 'encodeTypoScriptArray'));
        $instance->expects($this->at(0))->method('getBackendLayoutConfiguration')->with(1)->willReturn(array('conf'));
        $instance->expects($this->at(1))->method('ensureDottedKeys')->with(array('conf'))->willReturn(array('conf-converted'));
        $instance->expects($this->at(2))->method('encodeTypoScriptArray')->with(array('conf-converted'))->willReturn('config');
        $result = $instance->getBackendLayout('identifier', 1);
        $this->assertInstanceOf('TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout', $result);
        $this->assertEquals('identifier', $result->getIdentifier());
        $this->assertEquals('config', $result->getConfiguration());
    }