diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index c60d936ad..46950760f 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -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');