public function testIncompleteInstallation()
{
/** @var Connection|\PHPUnit_Framework_MockObject_MockObject $connection */
$connection = $this->getMock('Doctrine\\DBAL\\Connection', ['query'], [], '', false);
$connection->expects($this->any())->method('query')->willThrowException(new \Exception());
$framework = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\ContaoFramework')->setMethods(['initialize'])->disableOriginalConstructor()->getMock();
$framework->expects($this->never())->method('initialize');
$warmer = new ContaoCacheWarmer(new Filesystem(), new ResourceFinder($this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao'), new FileLocator($this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao'), $this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao', $connection, $framework);
$warmer->warmUp($this->getCacheDir());
$this->assertFileNotExists($this->getCacheDir() . '/contao');
}