Moved Mocking usage

Adding more documentation
This commit is contained in:
Philipp Holzer 2018-10-31 10:24:07 +01:00
parent 551efde226
commit 70e240691e
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
6 changed files with 65 additions and 9 deletions

View file

@ -5,6 +5,7 @@ namespace Friendica\Test\Util;
use Friendica\App;
use Friendica\BaseObject;
use Friendica\Render\FriendicaSmartyEngine;
use Mockery\MockInterface;
use org\bovigo\vfs\vfsStreamDirectory;
/**
@ -13,10 +14,9 @@ use org\bovigo\vfs\vfsStreamDirectory;
trait AppMockTrait
{
use ConfigMockTrait;
use DBAMockTrait;
/**
* @var App The Friendica global App Mock
* @var MockInterface|App The mocked Friendica\App
*/
protected $app;
@ -35,7 +35,7 @@ trait AppMockTrait
$this->mockConfigGet('system', 'theme', 'testtheme');
// Mocking App and most used functions
$this->app = \Mockery::mock('Friendica\App');
$this->app = \Mockery::mock(App::class);
$this->app
->shouldReceive('getBasePath')
->andReturn($root->url());