Browse Source

Merge pull request #352 from shama/patch-cakeschema-test-fix

CakeSchemaTest: Skip testSchemaReadWithConfigPrefix test if an existing prefix has been set
Mark Story 14 years ago
parent
commit
ba81754a1a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/Cake/Test/Case/Model/CakeSchemaTest.php

+ 3 - 0
lib/Cake/Test/Case/Model/CakeSchemaTest.php

@@ -640,8 +640,11 @@ class CakeSchemaTest extends CakeTestCase {
  */
 	public function testSchemaReadWithConfigPrefix() {
 		$this->skipIf($this->db instanceof Sqlite, 'Cannot open 2 connections to Sqlite');
+		
 		$db = ConnectionManager::getDataSource('test');
 		$config = $db->config;
+		$this->skipIf(!empty($config['prefix']), 'This test can not be executed with datasource prefix set.');
+		
 		$config['prefix'] = 'schema_test_prefix_';
 		ConnectionManager::create('schema_prefix', $config);
 		$read = $this->Schema->read(array('connection' => 'schema_prefix', 'models' => false));