X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fsrc%2FCore%2FInstallerTest.php;h=e56596c6c090b67fc0574d9c0041d74723173da9;hb=69fa6161e5c23a9cce494d6d5ba510534b01ce3b;hp=c1a003bade6d0ba374ca5b61056112afbf404b3e;hpb=1df19d3553efc02c76ed17cdc617312f19b21bce;p=friendica.git diff --git a/tests/src/Core/InstallerTest.php b/tests/src/Core/InstallerTest.php index c1a003bade..e56596c6c0 100644 --- a/tests/src/Core/InstallerTest.php +++ b/tests/src/Core/InstallerTest.php @@ -3,9 +3,12 @@ // this is in the same namespace as Install for mocking 'function_exists' namespace Friendica\Core; +use Friendica\Network\CurlResult; +use Friendica\Object\Image; use Friendica\Test\MockedTest; use Friendica\Test\Util\L10nMockTrait; use Friendica\Test\Util\VFSTrait; +use Friendica\Util\Network; /** * @runTestsInSeparateProcesses @@ -248,7 +251,7 @@ class InstallerTest extends MockedTest $this->mockL10nT(); // Mocking the CURL Response - $curlResult = \Mockery::mock('Friendica\Network\CurlResult'); + $curlResult = \Mockery::mock(CurlResult::class); $curlResult ->shouldReceive('getReturnCode') ->andReturn('404'); @@ -260,7 +263,7 @@ class InstallerTest extends MockedTest ->andReturn('test Error'); // Mocking the CURL Request - $networkMock = \Mockery::mock('alias:Friendica\Util\Network'); + $networkMock = \Mockery::mock('alias:' . Network::class); $networkMock ->shouldReceive('fetchUrlFull') ->with('https://test/install/testrewrite') @@ -287,19 +290,19 @@ class InstallerTest extends MockedTest $this->mockL10nT(); // Mocking the failed CURL Response - $curlResultF = \Mockery::mock('Friendica\Network\CurlResult'); + $curlResultF = \Mockery::mock(CurlResult::class); $curlResultF ->shouldReceive('getReturnCode') ->andReturn('404'); // Mocking the working CURL Response - $curlResultW = \Mockery::mock('Friendica\Network\CurlResult'); + $curlResultW = \Mockery::mock(CurlResult::class); $curlResultW ->shouldReceive('getReturnCode') ->andReturn('204'); // Mocking the CURL Request - $networkMock = \Mockery::mock('alias:Friendica\Util\Network'); + $networkMock = \Mockery::mock('alias:' . Network::class); $networkMock ->shouldReceive('fetchUrlFull') ->with('https://test/install/testrewrite') @@ -327,7 +330,7 @@ class InstallerTest extends MockedTest { $this->mockL10nT(); - $imageMock = \Mockery::mock('alias:Friendica\Object\Image'); + $imageMock = \Mockery::mock('alias:'. Image::class); $imageMock ->shouldReceive('supportedTypes') ->andReturn(['image/gif' => 'gif']); @@ -354,7 +357,7 @@ class InstallerTest extends MockedTest { $this->mockL10nT(); - $imageMock = \Mockery::mock('alias:Friendica\Object\Image'); + $imageMock = \Mockery::mock('alias:' . Image::class); $imageMock ->shouldReceive('supportedTypes') ->andReturn([]);