Fix mock test (remove "implicit" usage of previous Dice-setups)
This commit is contained in:
parent
c1dbb25656
commit
8a072b7fb3
1 changed files with 15 additions and 0 deletions
|
@ -2,11 +2,26 @@
|
|||
|
||||
namespace Friendica\Test\src\Core;
|
||||
|
||||
use Dice\Dice;
|
||||
use Friendica\App\BaseURL;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SystemTest extends TestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$baseUrl = \Mockery::mock(BaseURL::class);
|
||||
$baseUrl->shouldReceive('getHostname')->andReturn('friendica.local')->once();
|
||||
$dice = \Mockery::mock(Dice::class);
|
||||
$dice->shouldReceive('create')->with(BaseURL::class, [])->andReturn($baseUrl);
|
||||
|
||||
DI::init($dice);
|
||||
}
|
||||
|
||||
private function assertGuid($guid, $length, $prefix = '')
|
||||
{
|
||||
$length -= strlen($prefix);
|
||||
|
|
Loading…
Reference in a new issue