public function testSystemOverview()
{
$this->allowLogin($this->getApp());
$changeRepository = $this->getService('storage')->getRepository('Bolt\\Storage\\Entity\\LogChange');
$systemRepository = $this->getService('storage')->getRepository('Bolt\\Storage\\Entity\\LogSystem');
$log = $this->getMockBuilder(Manager::class)->setMethods(['clear', 'trim'])->setConstructorArgs([$this->getApp(), $changeRepository, $systemRepository])->getMock();
$log->expects($this->once())->method('clear')->will($this->returnValue(true));
$log->expects($this->once())->method('trim')->will($this->returnValue(true));
$this->setService('logger.manager', $log);
$this->setRequest(Request::create('/bolt/systemlog', 'GET', ['action' => 'trim']));
$this->controller()->systemOverview($this->getRequest());
$this->assertNotEmpty($this->getFlashBag()->get('success'));
$this->setRequest(Request::create('/bolt/systemlog', 'GET', ['action' => 'clear']));
$response = $this->controller()->systemOverview($this->getRequest());
$this->assertNotEmpty($this->getFlashBag()->get('success'));
$this->assertEquals('/bolt/systemlog', $response->getTargetUrl());
$this->setRequest(Request::create('/bolt/systemlog'));
$this->checkTwigForTemplate($this->getApp(), '@bolt/activity/systemlog.twig');
$this->controller()->systemOverview($this->getRequest());
}