[FOLLOWUP][BUGFIX] Notify user about insufficient language configuration 79/43379/2
authorNicole Cordes <typo3@cordes.co>
Wed, 16 Sep 2015 16:50:27 +0000 (18:50 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 16 Sep 2015 17:10:03 +0000 (19:10 +0200)
Patch fixes unit tests.

Related: #69757
Releases: master
Change-Id: I0cd85610bd0e41b10bfc6b97d91c0b69624b9a49
Reviewed-on: http://review.typo3.org/43379
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseSystemLanguageRowsTest.php

index bff0df1..a8e5e2d 100644 (file)
@@ -40,13 +40,25 @@ class DatabaseSystemLanguageRowsTest extends UnitTestCase {
         */
        protected $dbProphecy;
 
-       public function setUp() {
+       /**
+        * @var array A backup of registered singleton instances
+        */
+       protected $singletonInstances = [];
+
+       protected function setUp() {
+               $this->singletonInstances = GeneralUtility::getSingletonInstances();
                $this->dbProphecy = $this->prophesize(DatabaseConnection::class);
                $GLOBALS['TYPO3_DB'] = $this->dbProphecy->reveal();
 
                $this->subject = new DatabaseSystemLanguageRows();
        }
 
+       protected function tearDown() {
+               GeneralUtility::purgeInstances();
+               GeneralUtility::resetSingletonInstances($this->singletonInstances);
+               parent::tearDown();
+       }
+
        /**
         * @test
         */