public function testIncompleteInstallation()
{
$request = new Request();
$request->attributes->set('_route', 'dummy');
$container = $this->mockContainerWithContaoScopes(ContaoCoreBundle::SCOPE_BACKEND);
$container->get('request_stack')->push($request);
$configAdapter = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\Adapter')->disableOriginalConstructor()->setMethods(['isComplete', 'get', 'preload', 'getInstance'])->getMock();
$configAdapter->expects($this->any())->method('isComplete')->willReturn(false);
$configAdapter->expects($this->any())->method('get')->willReturnCallback(function ($key) {
switch ($key) {
case 'characterSet':
return 'UTF-8';
case 'timeZone':
return 'Europe/Berlin';
default:
return null;
}
});
$framework = $this->mockContaoFramework($container->get('request_stack'), $this->mockRouter('/contao/install'), ['Contao\\Config' => $configAdapter]);
$framework->setContainer($container);
$framework->initialize();
}