diff --git a/typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php b/typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php
index 0bb2644bccc4923f3ed42a4025f28d9e2624dd4a..dd36a26528799a68b05828e779d871f401cdc73a 100644
--- a/typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php
+++ b/typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php
@@ -61,10 +61,10 @@ class TranslationTest extends \TYPO3\TestingFramework\Core\Functional\Functional
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/blogs.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/translated-posts.xml');
 
+        $this->setUpBasicFrontendEnvironment();
+
         $this->objectManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
         $this->postRepository = $this->objectManager->get(\ExtbaseTeam\BlogExample\Domain\Repository\PostRepository::class);
-
-        $this->setUpBasicFrontendEnvironment();
     }
 
     /**
@@ -74,7 +74,7 @@ class TranslationTest extends \TYPO3\TestingFramework\Core\Functional\Functional
     {
         $environmentServiceMock = $this->createMock(\TYPO3\CMS\Extbase\Service\EnvironmentService::class);
         $environmentServiceMock
-            ->expects($this->any())
+            ->expects($this->atLeast(1))
             ->method('isEnvironmentInFrontendMode')
             ->willReturn(true);
         GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Service\EnvironmentService::class, $environmentServiceMock);