protected function setUp()
 {
     parent::setUp();
     $this->importDataSet(__DIR__ . '/fixtures.xml');
     $this->tsFrontendController = $this->getAccessibleMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
     $pageContextMock = $this->getMock(\TYPO3\CMS\Frontend\Page\PageRepository::class);
     $this->tsFrontendController->_set('sys_page', $pageContextMock);
 }
 /**
  * @test
  * @dataProvider jumpUrlDefaultValidParametersDataProvider
  * @param string $hash
  * @param string $jumpUrl
  */
 public function jumpUrlDefaultTransfersSession($hash, $jumpUrl)
 {
     $tsConfig['TSFE.']['jumpUrl_transferSession'] = 1;
     /** @var \PHPUnit_Framework_MockObject_MockObject|FrontendUserAuthentication $frontendUserMock */
     $frontendUserMock = $this->getMock(FrontendUserAuthentication::class);
     $frontendUserMock->id = 123;
     $this->tsfe->_set('fe_user', $frontendUserMock);
     $this->tsfe->expects($this->once())->method('getPagesTSconfig')->will($this->returnValue($tsConfig));
     $sessionGetParameter = (strpos($jumpUrl, '?') === false ? '?' : '') . '&FE_SESSION_KEY=123-fc9f825a9af59169895f3bb28267a42f';
     $expectedJumpUrl = $jumpUrl . $sessionGetParameter;
     $this->jumpUrlHandler->expects($this->once())->method('redirect')->with($expectedJumpUrl, HttpUtility::HTTP_STATUS_303);
     $_GET['jumpurl'] = $jumpUrl;
     $_GET['juHash'] = $hash;
     $this->jumpUrlHandler->canHandleCurrentUrl();
     $this->jumpUrlHandler->handle();
 }