mirror of
https://github.com/friendica/friendica
synced 2025-04-23 13:50:11 +00:00
Refactor ConfigMockTrait to mocked ConfigCache
This commit is contained in:
parent
38ac615ba0
commit
cb791024e4
27 changed files with 244 additions and 193 deletions
|
@ -5,7 +5,6 @@ namespace Friendica\Test\src\Core\Cache;
|
|||
use Friendica\Core\Cache\MemcachedCacheDriver;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Test\Util\AppMockTrait;
|
||||
use Friendica\Test\Util\DateTimeFormatMockTrait;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
use Friendica\Util\PidFile;
|
||||
|
||||
|
@ -13,7 +12,6 @@ abstract class CacheTest extends MockedTest
|
|||
{
|
||||
use VFSTrait;
|
||||
use AppMockTrait;
|
||||
use DateTimeFormatMockTrait;
|
||||
|
||||
/**
|
||||
* @var int Start time of the mock (used for time operations)
|
||||
|
@ -75,19 +73,10 @@ abstract class CacheTest extends MockedTest
|
|||
->shouldReceive('getHostname')
|
||||
->andReturn('friendica.local');
|
||||
|
||||
$this->mockUtcNow($this->startTime);
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$this->instance = $this->getInstance();
|
||||
|
||||
// Default config
|
||||
$this->mockConfigGet('config', 'hostname', 'localhost');
|
||||
$this->mockConfigGet('system', 'throttle_limit_day', 100);
|
||||
$this->mockConfigGet('system', 'throttle_limit_week', 100);
|
||||
$this->mockConfigGet('system', 'throttle_limit_month', 100);
|
||||
$this->mockConfigGet('system', 'theme', 'system_theme');
|
||||
|
||||
$this->instance->clear(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue