FluidTYPO3\Flux\Tests\Unit\Provider\AbstractProviderTest::testApplyLocalisationToPageValues PHP Метод

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

    public function testApplyLocalisationToPageValues()
    {
        $GLOBALS['TSFE'] = (object) array('page' => array('title' => 'foo'), 'sys_language_uid' => 1);
        $recordService = $this->getMock('FluidTYPO3\\Service\\RecordService', array('get'));
        $recordService->expects($this->once())->method('get')->willReturn(array(array('title' => 'bar', 'subtitle' => 'baz')));
        $subject = $this->getAccessibleMockForAbstractClass('FluidTYPO3\\Flux\\Provider\\AbstractProvider');
        $subject->_set('recordService', $recordService);
        $this->assertEquals(array('title' => 'bar', 'subtitle' => 'baz'), $this->callInaccessibleMethod($subject, 'getPageValues'));
    }