FluidTYPO3\Fluidpages\Tests\Unit\Backend\PageLayoutSelectorTest::testRenderField PHP Метод

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

public testRenderField ( ) : void
Результат void
    public function testRenderField()
    {
        /** @var PageLayoutSelector $instance */
        $instance = $this->getMock('FluidTYPO3\\Fluidpages\\Backend\\PageLayoutSelector', array('renderInheritanceField', 'renderOptions'));
        /** @var PageService|\PHPUnit_Framework_MockObject_MockObject $service */
        $service = $this->getMock('FluidTYPO3\\Fluidpages\\Service\\PageService', array('getAvailablePageTemplateFiles'));
        $service->expects($this->once())->method('getAvailablePageTemplateFiles')->willReturn(array('foo' => array('bar')));
        $instance->injectPageService($service);
        $parameters = array();
        $parent = '';
        $result = $instance->renderField($parameters, $parent);
        $this->assertStringStartsWith('<div>', $result);
        $this->assertStringEndsWith('</div>', $result);
    }