mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #8851 from MarkusBauer/v2.x/SqliteTestEnhancements
Sqlite testcase enhancements
This commit is contained in:
commit
0fd3ad9b76
1 changed files with 8 additions and 1 deletions
|
@ -168,7 +168,13 @@ class SqliteTest extends CakeTestCase {
|
|||
$dbName = 'db' . rand() . '$(*%&).db';
|
||||
$this->assertFalse(file_exists(TMP . $dbName));
|
||||
|
||||
$db = new Sqlite(array_merge($this->Dbo->config, array('database' => TMP . $dbName)));
|
||||
try {
|
||||
$db = new Sqlite(array_merge($this->Dbo->config, array('database' => TMP . $dbName)));
|
||||
} catch (MissingConnectionException $e) {
|
||||
// This might be caused by NTFS file systems, where '*' is a forbidden character. Repeat without this character.
|
||||
$dbName = str_replace('*', '', $dbName);
|
||||
$db = new Sqlite(array_merge($this->Dbo->config, array('database' => TMP . $dbName)));
|
||||
}
|
||||
$this->assertTrue(file_exists(TMP . $dbName));
|
||||
|
||||
$db->execute("CREATE TABLE test_list (id VARCHAR(255));");
|
||||
|
@ -500,6 +506,7 @@ SQL;
|
|||
* @return void
|
||||
*/
|
||||
public function testNestedTransaction() {
|
||||
$this->Dbo->useNestedTransactions = true;
|
||||
$this->skipIf($this->Dbo->nestedTransactionSupported() === false, 'The Sqlite version do not support nested transaction');
|
||||
|
||||
$this->loadFixtures('User');
|
||||
|
|
Loading…
Reference in a new issue