FluidTYPO3\Fluidpages\Tests\Unit\Provider\PageProviderTest::testGetTemplatePathAndFilename PHP Метод

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

    public function testGetTemplatePathAndFilename()
    {
        $expected = ExtensionManagementUtility::extPath('fluidpages', 'Tests/Fixtures/Templates/Page/Dummy.html');
        $fieldName = 'tx_fed_page_controller_action';
        $dataFieldName = 'tx_fed_page_flexform';
        /** @var PageService|\PHPUnit_Framework_MockObject_MockObject $service */
        $service = $this->getMock('FluidTYPO3\\Fluidpages\\Service\\PageService', array('getPageTemplateConfiguration'));
        $instance = new PageProvider();
        $instance->setTemplatePaths(array('templateRootPaths' => array('EXT:fluidpages/Tests/Fixtures/Templates/')));
        $instance->injectPageService($service);
        $record = array($fieldName => 'Fluidpages->dummy');
        $service->expects($this->any())->method('getPageTemplateConfiguration')->willReturn($record);
        $instance->trigger($record, null, $dataFieldName);
        $result = $instance->getTemplatePathAndFilename($record);
        $this->assertEquals($expected, $result);
    }