Bolt\Tests\Configuration\Validation\DatabaseSqliteTest::testSqliteFileNotExistsDirectoryWritableCacheReset PHP Метод

testSqliteFileNotExistsDirectoryWritableCacheReset() публичный Метод

    public function testSqliteFileNotExistsDirectoryWritableCacheReset()
    {
        $file = 'app/database/bolt.db';
        $dir = dirname($file);
        $databaseConfig = ['driver' => 'pdo_sqlite', 'path' => $file];
        $this->config->get('general/database')->willReturn($databaseConfig);
        $this->config->initialize()->shouldBeCalled();
        $this->resourceManager->getPath('cache/config-cache.json')->shouldBeCalled();
        $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(false));
        $this->_filesystem->expects($this->at(2))->method('file_exists')->will($this->returnValue(true));
        $this->_validation->expects($this->once())->method('extension_loaded')->will($this->returnValue(true));
        $this->validator->check('database');
    }