mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
adapt tests
This commit is contained in:
parent
d272e8c3c7
commit
326566638f
16 changed files with 254 additions and 712 deletions
|
@ -24,7 +24,10 @@ namespace Friendica\Test\src\Core\Lock;
|
|||
use Dice\Dice;
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Config\Model\Config;
|
||||
use Friendica\Core\Config\Type\JitConfig;
|
||||
use Friendica\Core\Config\Util\ConfigFileManager;
|
||||
use Friendica\Core\Config\ValueObject\Cache;
|
||||
use Friendica\Core\Lock\Type\SemaphoreLock;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
|
@ -42,11 +45,8 @@ class SemaphoreLockTest extends LockTest
|
|||
$app->shouldReceive('getHostname')->andReturn('friendica.local');
|
||||
$dice->shouldReceive('create')->with(App::class)->andReturn($app);
|
||||
|
||||
$configMock = Mockery::mock(JitConfig::class);
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'temppath')
|
||||
->andReturn('/tmp/');
|
||||
$configCache = new Cache(['system' => ['temppath' => '/tmp']]);
|
||||
$configMock = new Config(Mockery::mock(ConfigFileManager::class), $configCache);
|
||||
$dice->shouldReceive('create')->with(IManageConfigValues::class)->andReturn($configMock);
|
||||
|
||||
// @todo Because "get_temppath()" is using static methods, we have to initialize the BaseObject
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue