]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/InstallerTest.php
Remove annotations and fix test..
[friendica.git] / tests / src / Core / InstallerTest.php
index b2ef92b450c6f2d96428fb0bd195f5609a22fd20..dd7790e7399154492562bc6a3e1f3443e01c7f8a 100644 (file)
@@ -34,7 +34,7 @@ class InstallerTest extends MockedTest
                $dice = $dice->addRules(include __DIR__ . '/../../../static/dependencies.config.php');
 
                $dice->shouldReceive('create')
-                          ->with(\Friendica\Core\L10n\L10n::class)
+                          ->with(\Friendica\Core\L10n\L10n::class, [])
                           ->andReturn($this->l10nMock);
 
                DI::init($dice);
@@ -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));
        }
 
        /**
@@ -362,7 +364,7 @@ class InstallerTest extends MockedTest
                $this->assertTrue($install->checkImagick());
 
                $this->assertCheckExist(1,
-                       L10n::t('ImageMagick supports GIF'),
+                       $this->l10nMock->t('ImageMagick supports GIF'),
                        '',
                        true,
                        false,
@@ -385,7 +387,7 @@ class InstallerTest extends MockedTest
                // even there is no supported type, Imagick should return true (because it is not required)
                $this->assertTrue($install->checkImagick());
                $this->assertCheckExist(1,
-                       L10n::t('ImageMagick supports GIF'),
+                       $this->l10nMock->t('ImageMagick supports GIF'),
                        '',
                        false,
                        false,