]> git.mxchange.org Git - friendica.git/commitdiff
Hopefully this fixes the tests again
authorMichael <heluecht@pirati.ca>
Sat, 22 Dec 2018 22:04:47 +0000 (22:04 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 22 Dec 2018 22:04:47 +0000 (22:04 +0000)
src/Core/Installer.php
tests/src/Core/InstallerTest.php

index 912406a29822de51508c1a9c6570d9aaebd95cab..74d6114f160e124644555c5d8a3027ad8dbc44f4 100644 (file)
@@ -405,13 +405,6 @@ class Installer
                );
                $returnVal = $returnVal ? $status : false;
 
-               $status = $this->checkFunction('json_encode',
-                       L10n::t('JSON PHP module'),
-                       L10n::t('Error: JSON PHP module required but not installed.'),
-                       true
-               );
-               $returnVal = $returnVal ? $status : false;
-
                $status = $this->checkFunction('imagecreatefromjpeg',
                        L10n::t('GD graphics PHP module'),
                        L10n::t('Error: GD graphics PHP module with JPEG support required but not installed.'),
@@ -447,6 +440,13 @@ class Installer
                );
                $returnVal = $returnVal ? $status : false;
 
+               $status = $this->checkFunction('json_encode',
+                       L10n::t('JSON PHP module'),
+                       L10n::t('Error: JSON PHP module required but not installed.'),
+                       true
+               );
+               $returnVal = $returnVal ? $status : false;
+
                return $returnVal;
        }
 
index 32a80a77e0988adc3ef3283d3d22c776a7f61802..d860321d43d1201bb263514f9df5176e97a164e1 100644 (file)
@@ -177,6 +177,17 @@ class InstallerTest extends MockedTest
                        true,
                        $install->getChecks());
 
+               $this->mockFunctionL10TCalls();
+               $this->setFunctions(['json_encode' => false]);
+               $install = new Installer();
+               $this->assertFalse($install->checkFunctions());
+               $this->assertCheckExist(9,
+                       'JSON PHP module',
+                       'Error: JSON PHP module required but not installed.',
+                       false,
+                       true,
+                       $install->getChecks());
+
                $this->mockFunctionL10TCalls();
                $this->setFunctions([
                        'curl_init' => true,