Skip to content

Commit

Permalink
Fixes functional tests by setting up a minimal fake request
Browse files Browse the repository at this point in the history
  • Loading branch information
maechler committed Oct 24, 2024
1 parent a8e6287 commit 9f51801
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/Functional/AbstractFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
use Smalot\PdfParser\Parser;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Core\SystemEnvironmentBuilder;
use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\TypoScript\AST\Node\RootNode;
use TYPO3\CMS\Core\TypoScript\FrontendTypoScript;

/**
* BaseFunctionalTest
Expand All @@ -61,6 +65,13 @@ public function setUp(): void
{
parent::setUp();

$frontendTypoScript = new FrontendTypoScript(new RootNode(), [], [], []);
$frontendTypoScript->setSetupArray([]);

$GLOBALS['TYPO3_REQUEST'] = (new ServerRequest())
->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE)
->withAttribute('frontend.typoscript', $frontendTypoScript);

$baseTypoScripts = [
'EXT:pdfviewhelpers/Configuration/TypoScript/setup.typoscript',
$this->getFixtureExtPath('setup.typoscript'),
Expand Down

0 comments on commit 9f51801

Please sign in to comment.