mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing sqlite test case
This commit is contained in:
parent
7870fb1ef2
commit
8444510bae
1 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ App::uses('Sqlite', 'Model/Datasource/Database');
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.tests.cases.libs.model.datasources
|
* @subpackage cake.tests.cases.libs.model.datasources
|
||||||
*/
|
*/
|
||||||
class DboSqliteTestDb extends DboSqlite {
|
class DboSqliteTestDb extends Sqlite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* simulated property
|
* simulated property
|
||||||
|
@ -99,7 +99,7 @@ class DboSqliteTest extends CakeTestCase {
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
Configure::write('Cache.disable', true);
|
Configure::write('Cache.disable', true);
|
||||||
$this->Dbo = ConnectionManager::getDataSource('test');
|
$this->Dbo = ConnectionManager::getDataSource('test');
|
||||||
if ($this->Dbo->config['driver'] !== 'sqlite') {
|
if (!$this->Dbo instanceof Sqlite) {
|
||||||
$this->markTestSkipped('The Sqlite extension is not available.');
|
$this->markTestSkipped('The Sqlite extension is not available.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ class DboSqliteTest extends CakeTestCase {
|
||||||
$this->assertFalse(file_exists(TMP . $dbName));
|
$this->assertFalse(file_exists(TMP . $dbName));
|
||||||
|
|
||||||
$config = $this->Dbo->config;
|
$config = $this->Dbo->config;
|
||||||
$db = new DboSqlite(array_merge($this->Dbo->config, array('database' => TMP . $dbName)));
|
$db = new Sqlite(array_merge($this->Dbo->config, array('database' => TMP . $dbName)));
|
||||||
$this->assertTrue(file_exists(TMP . $dbName));
|
$this->assertTrue(file_exists(TMP . $dbName));
|
||||||
|
|
||||||
$db->execute("CREATE TABLE test_list (id VARCHAR(255));");
|
$db->execute("CREATE TABLE test_list (id VARCHAR(255));");
|
||||||
|
|
Loading…
Reference in a new issue