mirror of
https://github.com/friendica/friendica
synced 2025-04-24 00:30:11 +00:00
Replace string namespaces with ::class
This commit is contained in:
parent
9f11476ca0
commit
5fc42a744e
11 changed files with 52 additions and 26 deletions
|
@ -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([]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue