Skipping tests on Sqlite that involve creating a duplicate connection/ It is not possible to open multiple connections to it

This commit is contained in:
Jose Lorenzo Rodriguez 2011-09-03 21:07:40 -04:30
parent 149deba416
commit 12c73806f4
3 changed files with 5 additions and 0 deletions

View file

@ -649,6 +649,7 @@ class CakeSchemaTest extends CakeTestCase {
* @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_';

View file

@ -339,6 +339,7 @@ class ModelReadTest extends BaseModelTest {
* @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();

View file

@ -225,6 +225,7 @@ class CakeTestFixtureTest extends CakeTestCase {
* @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);
@ -265,6 +266,7 @@ class CakeTestFixtureTest extends CakeTestCase {
* @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_';
@ -294,6 +296,7 @@ class CakeTestFixtureTest extends CakeTestCase {
* @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();