public function testSqliteFileNotExistsDirectoryWritable()
{
$file = 'app/database/bolt.db';
$dir = dirname($file);
$databaseConfig = ['driver' => 'pdo_sqlite', 'path' => $file];
$this->config->get('general/database')->willReturn($databaseConfig);
$this->extensionController->databasePath('folder', $dir, 'is not writable')->shouldNotBeCalled();
$this->_filesystem->expects($this->at(0))->method('file_exists')->with($file)->will($this->returnValue(false));
$this->_filesystem->expects($this->at(1))->method('file_exists')->with($dir)->will($this->returnValue(true));
$this->_filesystem->expects($this->once())->method('touch')->with($dir)->will($this->returnValue(true));
$this->_validation->expects($this->once())->method('extension_loaded')->will($this->returnValue(true));
$this->validator->check('database');
}