This repository was archived by the owner on Feb 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,6 @@ public function rawAction()
9595 */
9696 public function getRecord ()
9797 {
98- return $ this -> workspacesAwareRecordService -> getSingle ( $ this -> fluxTableName , ' * ' , $ GLOBALS ['TSFE ' ]->id ) ;
98+ return $ GLOBALS ['TSFE ' ]->page ?? null ;
9999 }
100100}
Original file line number Diff line number Diff line change 1414use FluidTYPO3 \Fluidpages \Tests \Fixtures \Controller \DummyPageController ;
1515use FluidTYPO3 \Fluidpages \Tests \Unit \AbstractTestCase ;
1616use FluidTYPO3 \Flux \Provider \Provider ;
17- use FluidTYPO3 \Flux \Service \WorkspacesAwareRecordService ;
1817use TYPO3 \CMS \Core \Utility \GeneralUtility ;
1918use TYPO3 \CMS \Fluid \View \TemplateView ;
2019
@@ -38,15 +37,13 @@ public function testPerformsInjections()
3837 /**
3938 * @return void
4039 */
41- public function testGetRecordDelegatesToRecordService ()
40+ public function testGetRecordReadsFromTypoScriptFrontendController ()
4241 {
42+ $ GLOBALS ['TSFE ' ] = (object ) ['page ' => ['foo ' => 'bar ' ]];
4343 /** @var PageController $subject */
4444 $ subject = $ this ->getMockBuilder ('FluidTYPO3 \\Fluidpages \\Controller \\PageController ' )->setMethods (array ('dummy ' ))->getMock ();
45- /** @var WorkspacesAwareRecordService|\PHPUnit_Framework_MockObject_MockObject $mockService */
46- $ mockService = $ this ->getMockBuilder ('FluidTYPO3 \\Flux \\Service \\WorkspacesAwareRecordService ' )->setMethods (array ('getSingle ' ))->getMock ();
47- $ mockService ->expects ($ this ->once ())->method ('getSingle ' );
48- $ subject ->injectWorkspacesAwareRecordService ($ mockService );
49- $ subject ->getRecord ();
45+ $ record = $ subject ->getRecord ();
46+ $ this ->assertSame (['foo ' => 'bar ' ], $ record );
5047 }
5148
5249 public function testInitializeProvider ()
You can’t perform that action at this time.
0 commit comments