mirror of
https://github.com/friendica/friendica
synced 2025-04-25 01:10:12 +00:00
Replace Config-Cache dependency with Config-Model (no more DB-waiting necessary)
This commit is contained in:
parent
a6fb683bcd
commit
ab6efea9b2
18 changed files with 210 additions and 325 deletions
|
@ -25,6 +25,7 @@ use Dice\Dice;
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Cache\Capability\ICanCache;
|
||||
use Friendica\Core\Cache\Capability\ICanCacheInMemory;
|
||||
use Friendica\Core\Config\Model\Config;
|
||||
use Friendica\Core\Config\ValueObject\Cache;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Lock\Capability\ICanLock;
|
||||
|
@ -86,33 +87,6 @@ class DependencyCheckTest extends TestCase
|
|||
self::assertArrayHasKey('system', $configCache->getAll());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the construction of a profiler class with DI
|
||||
*/
|
||||
public function testProfiler()
|
||||
{
|
||||
/** @var Profiler $profiler */
|
||||
$profiler = $this->dice->create(Profiler::class);
|
||||
|
||||
self::assertInstanceOf(Profiler::class, $profiler);
|
||||
|
||||
$configCache = new Cache([
|
||||
'system' => [
|
||||
'profiler' => true,
|
||||
],
|
||||
'rendertime' => [
|
||||
'callstack' => true,
|
||||
]
|
||||
]);
|
||||
|
||||
// create new DI-library because of shared instance rule (so the Profiler wouldn't get created twice)
|
||||
$this->dice = new Dice();
|
||||
$profiler = $this->dice->create(Profiler::class, [$configCache]);
|
||||
|
||||
self::assertInstanceOf(Profiler::class, $profiler);
|
||||
self::assertTrue($profiler->isRendertime());
|
||||
}
|
||||
|
||||
public function testDatabase()
|
||||
{
|
||||
// PDO needs to be disabled for PHP 7.2, see https://jira.mariadb.org/browse/MDEV-24121
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue