diff --git a/typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendWorkspaceRestrictionTest.php b/typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendWorkspaceRestrictionTest.php
index c7b608393ea908a7886206cb91e92906adbece8d..19a8932f0b9c4c4e416394952294209b82ee79dd 100644
--- a/typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendWorkspaceRestrictionTest.php
+++ b/typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendWorkspaceRestrictionTest.php
@@ -20,11 +20,6 @@ use TYPO3\CMS\Frontend\Page\PageRepository;
 
 class FrontendWorkspaceRestrictionTest extends AbstractRestrictionTestCase
 {
-    /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
     /**
      * @test
      */
@@ -41,6 +36,9 @@ class FrontendWorkspaceRestrictionTest extends AbstractRestrictionTestCase
         $pageRepository = $this->createMock(PageRepository::class);
         $pageRepository->versioningPreview = false;
 
+        $GLOBALS['TSFE'] = new \stdClass();
+        $GLOBALS['TSFE']->sys_page = $pageRepository;
+
         $subject = new FrontendWorkspaceRestriction(0);
         $expression = $subject->buildExpression(['aTable' => 'aTable'], $this->expressionBuilder);
         $this->assertSame('("aTable"."t3ver_state" <= 0) AND ("aTable"."pid" <> -1)', (string)$expression);