[TASK] Make LocalizationFactoryTest notice free 60/56160/4
authorJan Helke <typo3@helke.de>
Thu, 15 Mar 2018 11:54:39 +0000 (12:54 +0100)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Thu, 15 Mar 2018 16:36:30 +0000 (17:36 +0100)
Resolves: #84282
Releases: master
Change-Id: I8ba82db0dd83cf8bc8c2011bb5760f44763de109
Reviewed-on: https://review.typo3.org/56160
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/core/Tests/Unit/Localization/LocalizationFactoryTest.php

index e0a714f..c5c2e6d 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Core\Tests\Unit\Localization;
 use Prophecy\Argument;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
+use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend;
 use TYPO3\CMS\Core\Localization\Exception\FileNotFoundException;
 use TYPO3\CMS\Core\Localization\LanguageStore;
 use TYPO3\CMS\Core\Localization\LocalizationFactory;
@@ -28,11 +29,6 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
  */
 class LocalizationFactoryTest extends UnitTestCase
 {
-    /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
     public function tearDown()
     {
         // Drop created singletons again
@@ -98,14 +94,14 @@ class LocalizationFactoryTest extends UnitTestCase
         $languageStore = $this->getMockBuilder(LanguageStore::class)
             ->setMethods(['hasData', 'setConfiguration', 'getData', 'setData'])
             ->getMock();
-        $cacheInstance = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class)
+        $cacheInstance = $this->getMockBuilder(VariableFrontend::class)
             ->setMethods(['get', 'set'])
             ->disableOriginalConstructor()
             ->getMock();
         $localizationFactory->_set('store', $languageStore);
         $localizationFactory->_set('cacheInstance', $cacheInstance);
         $languageStore->method('hasData')->willReturn(false);
-        $languageStore->method('getData')->willReturn([]);
+        $languageStore->method('getData')->willReturn(['default' => []]);
         $languageStore->method('setConfiguration')->willThrowException(new FileNotFoundException('testing', 1476049512));
         $cacheInstance->method('get')->willReturn(false);
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'] = ['foo' => 'bar'];