+ $config = \Mockery::mock(IManageConfigValues::class);
+ $config->shouldReceive('get')
+ ->with('system', 'profiler')
+ ->andReturn(false)
+ ->once();
+ $config->shouldReceive('get')
+ ->with('rendertime', 'callstack')
+ ->andReturn(false)
+ ->once();
+
+ $profiler->update($config);
+
+ self::assertFalse($profiler->isRendertime());
+ self::assertEmpty($profiler->getRendertimeString());
+
+ $config->shouldReceive('get')
+ ->with('system', 'profiler')
+ ->andReturn(true)
+ ->once();
+ $config->shouldReceive('get')
+ ->with('rendertime', 'callstack')
+ ->andReturn(true)
+ ->once();
+
+ $profiler->update($config);
+
+ $profiler->saveTimestamp(time(), 'database', 'test2');
+
+ self::assertTrue($profiler->isRendertime());
+ $output = $profiler->getRendertimeString();
+ self::assertMatchesRegularExpression('/test1: \d+/', $output);
+ self::assertMatchesRegularExpression('/test2: \d+/', $output);