Skip to content

Commit

Permalink
Skipping tests on Sqlite that involve creating a duplicate connection…
Browse files Browse the repository at this point in the history
…/ It is not possible to open multiple connections to it
  • Loading branch information
lorenzo committed Sep 4, 2011
1 parent 149deba commit 12c7380
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Model/CakeSchemaTest.php
Expand Up @@ -649,6 +649,7 @@ public function testSchemaReadWithTablePrefix() {
* @return void
*/
public function testSchemaReadWithConfigPrefix() {
$this->skipIf($this->db instanceof Sqlite, 'Cannot open 2 connections to Sqlite');
$db = ConnectionManager::getDataSource('test');
$config = $db->config;
$config['prefix'] = 'schema_test_prefix_';
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Model/ModelReadTest.php
Expand Up @@ -339,6 +339,7 @@ public function testPreparedQuery() {
* @return void
*/
public function testParameterMismatch() {
$this->skipIf($this->db instanceof Sqlite, 'Sqlite does not accept real prepared statements, no way to check this');
$this->loadFixtures('Article', 'User', 'Tag', 'ArticlesTag');
$Article = new Article();

Expand Down
3 changes: 3 additions & 0 deletions lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php
Expand Up @@ -225,6 +225,7 @@ public function testInit() {
* @return void
*/
public function testInitDbPrefix() {
$this->skipIf($this->db instanceof Sqlite, 'Cannot open 2 connections to Sqlite');
$db = ConnectionManager::getDataSource('test');
$Source = new CakeTestFixtureTestFixture();
$Source->drop($db);
Expand Down Expand Up @@ -265,6 +266,7 @@ public function testInitDbPrefix() {
* @return void
*/
public function testInitDbPrefixDuplication() {
$this->skipIf($this->db instanceof Sqlite, 'Cannot open 2 connections to Sqlite');
$db = ConnectionManager::getDataSource('test');
$backPrefix = $db->config['prefix'];
$db->config['prefix'] = 'cake_fixture_test_';
Expand Down Expand Up @@ -294,6 +296,7 @@ public function testInitDbPrefixDuplication() {
* @return void
*/
public function testInitModelTablePrefix() {
$this->skipIf($this->db instanceof Sqlite, 'Cannot open 2 connections to Sqlite');
$this->skipIf(!empty($this->db->config['prefix']), 'Cannot run this test, you have a database connection prefix.');

$Source = new CakeTestFixtureTestFixture();
Expand Down

0 comments on commit 12c7380

Please sign in to comment.