]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/InstallerTest.php
Move L10n class from L10n subdir to Core (replacing old wrapper)
[friendica.git] / tests / src / Core / InstallerTest.php
index 674195c128878a550c7af1c28c4bacf2976aab45..abc20876384dc4144c944a442a445319495e2450 100644 (file)
@@ -17,7 +17,7 @@ class InstallerTest extends MockedTest
        use VFSTrait;
 
        /**
-        * @var \Friendica\Core\L10n\L10n|MockInterface
+        * @var \Friendica\Core\L10n|MockInterface
         */
        private $l10nMock;
 
@@ -27,14 +27,14 @@ class InstallerTest extends MockedTest
 
                $this->setUpVfsDir();
 
-               $this->l10nMock = \Mockery::mock(\Friendica\Core\L10n\L10n::class);
+               $this->l10nMock = \Mockery::mock(\Friendica\Core\L10n::class);
 
                /** @var Dice|MockInterface $dice */
                $dice = \Mockery::mock(Dice::class)->makePartial();
                $dice = $dice->addRules(include __DIR__ . '/../../../static/dependencies.config.php');
 
                $dice->shouldReceive('create')
-                          ->with(\Friendica\Core\L10n\L10n::class, [])
+                          ->with(\Friendica\Core\L10n::class)
                           ->andReturn($this->l10nMock);
 
                DI::init($dice);
@@ -46,7 +46,7 @@ class InstallerTest extends MockedTest
        }
 
        /**
-        * Mocking the L10n::t() calls for the function checks
+        * Mocking the DI::l10n()->t() calls for the function checks
         */
        private function mockFunctionL10TCalls()
        {
@@ -73,13 +73,15 @@ class InstallerTest extends MockedTest
 
        private function assertCheckExist($position, $title, $help, $status, $required, $assertionArray)
        {
-               $this->assertArraySubset([$position => [
+               $subSet = [$position => [
                        'title' => $title,
                        'status' => $status,
                        'required' => $required,
                        'error_msg' => null,
                        'help' => $help]
-               ], $assertionArray);
+               ];
+
+               $this->assertArraySubset($subSet, $assertionArray, false, "expected subset: " . PHP_EOL . print_r($subSet, true) . PHP_EOL . "current subset: " . print_r($assertionArray, true));
        }
 
        /**
@@ -387,7 +389,7 @@ class InstallerTest extends MockedTest
                $this->assertCheckExist(1,
                        $this->l10nMock->t('ImageMagick supports GIF'),
                        '',
-                       true,
+                       false,
                        false,
                        $install->getChecks());
        }