mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:50:11 +00:00
Adapt tests
This commit is contained in:
parent
8385ee7a61
commit
3eb2abdb2a
8 changed files with 90 additions and 43 deletions
|
@ -26,7 +26,7 @@ use Dice\Dice;
|
|||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\IHTTPResult;
|
||||
use Friendica\Network\IHTTPRequest;
|
||||
use Friendica\Network\IHTTPClient;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
use Mockery;
|
||||
|
@ -331,7 +331,7 @@ class InstallerTest extends MockedTest
|
|||
->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')
|
||||
|
@ -342,7 +342,7 @@ class InstallerTest extends MockedTest
|
|||
->andReturn($IHTTPResult);
|
||||
|
||||
$this->dice->shouldReceive('create')
|
||||
->with(IHTTPRequest::class)
|
||||
->with(IHTTPClient::class)
|
||||
->andReturn($networkMock);
|
||||
|
||||
DI::init($this->dice);
|
||||
|
@ -378,7 +378,7 @@ class InstallerTest extends MockedTest
|
|||
->andReturn('204');
|
||||
|
||||
// Mocking the CURL Request
|
||||
$networkMock = Mockery::mock(IHTTPRequest::class);
|
||||
$networkMock = Mockery::mock(IHTTPClient::class);
|
||||
$networkMock
|
||||
->shouldReceive('fetchFull')
|
||||
->with('https://test/install/testrewrite')
|
||||
|
@ -389,7 +389,7 @@ class InstallerTest extends MockedTest
|
|||
->andReturn($IHTTPResultW);
|
||||
|
||||
$this->dice->shouldReceive('create')
|
||||
->with(IHTTPRequest::class)
|
||||
->with(IHTTPClient::class)
|
||||
->andReturn($networkMock);
|
||||
|
||||
DI::init($this->dice);
|
||||
|
|
|
@ -34,7 +34,7 @@ use Friendica\Factory\ConfigFactory;
|
|||
use Friendica\Model\Config\Config;
|
||||
use Friendica\Model\Storage;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Network\HTTPClient;
|
||||
use Friendica\Test\DatabaseTest;
|
||||
use Friendica\Test\Util\Database\StaticDatabase;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
|
@ -55,7 +55,7 @@ class StorageManagerTest extends DatabaseTest
|
|||
private $logger;
|
||||
/** @var L10n */
|
||||
private $l10n;
|
||||
/** @var HTTPRequest */
|
||||
/** @var HTTPClient */
|
||||
private $httpRequest;
|
||||
|
||||
protected function setUp(): void
|
||||
|
@ -84,7 +84,7 @@ class StorageManagerTest extends DatabaseTest
|
|||
|
||||
$this->l10n = \Mockery::mock(L10n::class);
|
||||
|
||||
$this->httpRequest = \Mockery::mock(HTTPRequest::class);
|
||||
$this->httpRequest = \Mockery::mock(HTTPClient::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue