mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Fixed ConsoleTest
This commit is contained in:
parent
f4ec7c47b9
commit
acd5060ec2
3 changed files with 59 additions and 2 deletions
|
@ -30,6 +30,11 @@ trait AppMockTrait
|
|||
*/
|
||||
protected $profilerMock;
|
||||
|
||||
/**
|
||||
* @var MockInterface|App\Mode The mocked App mode
|
||||
*/
|
||||
protected $mode;
|
||||
|
||||
/**
|
||||
* Mock the App
|
||||
*
|
||||
|
@ -38,6 +43,7 @@ trait AppMockTrait
|
|||
public function mockApp($root)
|
||||
{
|
||||
$this->configMock = \Mockery::mock(Config\Cache\IConfigCache::class);
|
||||
$this->mode = \Mockery::mock(App\Mode::class);
|
||||
$configAdapterMock = \Mockery::mock(Config\Adapter\IConfigAdapter::class);
|
||||
// Disable the adapter
|
||||
$configAdapterMock->shouldReceive('isConnected')->andReturn(false);
|
||||
|
@ -52,6 +58,10 @@ trait AppMockTrait
|
|||
->shouldReceive('getBasePath')
|
||||
->andReturn($root->url());
|
||||
|
||||
$this->app
|
||||
->shouldReceive('getMode')
|
||||
->andReturn($this->mode);
|
||||
|
||||
$this->configMock
|
||||
->shouldReceive('has')
|
||||
->andReturn(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue