Get a usable page configuration flexform from rootline
public getPageFlexFormSource ( integer $pageUid ) : string | ||
$pageUid | integer | |
리턴 | string |
/** * @return void */ public function testGetPageFlexFormSource() { $record1 = array('pid' => 2, 'uid' => 1); $record2 = array('pid' => 0, 'uid' => 3, 'tx_fed_page_flexform' => 'test'); $service = $this->getMock('FluidTYPO3\\Flux\\Service\\WorkspacesAwareRecordService', array('getSingle')); $service->expects($this->at(0))->method('getSingle')->with('pages', '*', 1)->willReturn($record1); $service->expects($this->at(1))->method('getSingle')->with('pages', '*', 2)->willReturn($record2); $instance = new PageService(); $instance->injectWorkspacesAwareRecordService($service); $output = $instance->getPageFlexFormSource(1); $this->assertEquals('test', $output); }