- $this->assertNotEmpty($configCache->getAll());
- $this->assertArrayHasKey('database', $configCache->getAll());
- $this->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);
-
- $this->assertInstanceOf(Profiler::class, $profiler);
-
- $configCache = new ConfigCache([
- '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]);
-
- $this->assertInstanceOf(Profiler::class, $profiler);
- $this->assertTrue($profiler->isRendertime());
+ self::assertNotEmpty($configCache->getAll());
+ self::assertArrayHasKey('database', $configCache->getAll());
+ self::assertArrayHasKey('system', $configCache->getAll());