From: Nicole Cordes Date: Fri, 25 May 2018 10:14:15 +0000 (+0200) Subject: [BUGFIX] Ensure Extbase translation tests fulfill expectations X-Git-Tag: v9.3.0~103 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/0927abdd3a197ff9bf785bdecc8980e14248be3d?hp=396e55d0f7337075d977a2051d31edd6a8b7caaa [BUGFIX] Ensure Extbase translation tests fulfill expectations Ensure the test is executed as expected. Resolves: #85082 Releases: master, 8.7 Change-Id: Ia0dfbdc12eeefbb28996f69dade4298b1464afa6 Reviewed-on: https://review.typo3.org/57050 Tested-by: TYPO3com Reviewed-by: Markus Klein Reviewed-by: Benni Mack Tested-by: Benni Mack Tested-by: Markus Klein --- diff --git a/typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php b/typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php index 0bb2644bccc4..dd36a2652879 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);