]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/InstallerTest.php
Merge pull request #10825 from nupplaphil/feat/Storage_refactor
[friendica.git] / tests / src / Core / InstallerTest.php
index 7404e216e2389661bb17bb465c25b6512fd25946..1263fe7e67b73f0f7e72c0ed3f3af80287ec87a3 100644 (file)
@@ -25,8 +25,8 @@ namespace Friendica\Core;
 use Dice\Dice;
 use Friendica\Core\Config\Cache;
 use Friendica\DI;
-use Friendica\Network\CurlResult;
-use Friendica\Network\IHTTPRequest;
+use Friendica\Network\IHTTPResult;
+use Friendica\Network\IHTTPClient;
 use Friendica\Test\MockedTest;
 use Friendica\Test\Util\VFSTrait;
 use Mockery;
@@ -103,7 +103,7 @@ class InstallerTest extends MockedTest
                $this->mockL10nT('File Information PHP module', 1);
                $this->mockL10nT('Error: File Information PHP module required but not installed.', 1);
                $this->mockL10nT('Program execution functions', 1);
-               $this->mockL10nT('Error: Program execution functions required but not enabled.', 1);
+               $this->mockL10nT('Error: Program execution functions (proc_open) required but not enabled.', 1);
        }
 
        private function assertCheckExist($position, $title, $help, $status, $required, $assertionArray)
@@ -248,7 +248,7 @@ class InstallerTest extends MockedTest
                self::assertFalse($install->checkFunctions());
                self::assertCheckExist(9,
                        'Program execution functions',
-                       'Error: Program execution functions required but not enabled.',
+                       'Error: Program execution functions (proc_open) required but not enabled.',
                        false,
                        true,
                        $install->getChecks());
@@ -319,30 +319,30 @@ class InstallerTest extends MockedTest
                $this->l10nMock->shouldReceive('t')->andReturnUsing(function ($args) { return $args; });
 
                // Mocking the CURL Response
-               $curlResult = Mockery::mock(CurlResult::class);
-               $curlResult
+               $IHTTPResult = Mockery::mock(IHTTPResult::class);
+               $IHTTPResult
                        ->shouldReceive('getReturnCode')
                        ->andReturn('404');
-               $curlResult
+               $IHTTPResult
                        ->shouldReceive('getRedirectUrl')
                        ->andReturn('');
-               $curlResult
+               $IHTTPResult
                        ->shouldReceive('getError')
                        ->andReturn('test Error');
 
                // Mocking the CURL Request
-               $networkMock = Mockery::mock(IHTTPRequest::class);
+               $networkMock = Mockery::mock(IHTTPClient::class);
                $networkMock
                        ->shouldReceive('fetchFull')
                        ->with('https://test/install/testrewrite')
-                       ->andReturn($curlResult);
+                       ->andReturn($IHTTPResult);
                $networkMock
                        ->shouldReceive('fetchFull')
                        ->with('http://test/install/testrewrite')
-                       ->andReturn($curlResult);
+                       ->andReturn($IHTTPResult);
 
                $this->dice->shouldReceive('create')
-                    ->with(IHTTPRequest::class)
+                    ->with(IHTTPClient::class)
                     ->andReturn($networkMock);
 
                DI::init($this->dice);
@@ -366,30 +366,30 @@ class InstallerTest extends MockedTest
                $this->l10nMock->shouldReceive('t')->andReturnUsing(function ($args) { return $args; });
 
                // Mocking the failed CURL Response
-               $curlResultF = Mockery::mock(CurlResult::class);
-               $curlResultF
+               $IHTTPResultF = Mockery::mock(IHTTPResult::class);
+               $IHTTPResultF
                        ->shouldReceive('getReturnCode')
                        ->andReturn('404');
 
                // Mocking the working CURL Response
-               $curlResultW = Mockery::mock(CurlResult::class);
-               $curlResultW
+               $IHTTPResultW = Mockery::mock(IHTTPResult::class);
+               $IHTTPResultW
                        ->shouldReceive('getReturnCode')
                        ->andReturn('204');
 
                // Mocking the CURL Request
-               $networkMock = Mockery::mock(IHTTPRequest::class);
+               $networkMock = Mockery::mock(IHTTPClient::class);
                $networkMock
                        ->shouldReceive('fetchFull')
                        ->with('https://test/install/testrewrite')
-                       ->andReturn($curlResultF);
+                       ->andReturn($IHTTPResultF);
                $networkMock
                        ->shouldReceive('fetchFull')
                        ->with('http://test/install/testrewrite')
-                       ->andReturn($curlResultW);
+                       ->andReturn($IHTTPResultW);
 
                $this->dice->shouldReceive('create')
-                          ->with(IHTTPRequest::class)
+                          ->with(IHTTPClient::class)
                           ->andReturn($networkMock);
 
                DI::init($this->dice);