Removing more dead code

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-27 01:48:28 -04:30
parent 1f6c5fbc87
commit 2c32d34faf

View file

@ -322,9 +322,7 @@ class CakeTestFixtureTest extends CakeTestCase {
* @return void * @return void
*/ */
function testImport() { function testImport() {
$defaultDb = ConnectionManager::getDataSource('default');
$testSuiteDb = ConnectionManager::getDataSource('test'); $testSuiteDb = ConnectionManager::getDataSource('test');
$defaultConfig = $defaultDb->config;
$testSuiteConfig = $testSuiteDb->config; $testSuiteConfig = $testSuiteDb->config;
ConnectionManager::create('new_test_suite', array_merge($testSuiteConfig, array('prefix' => 'new_' . $testSuiteConfig['prefix']))); ConnectionManager::create('new_test_suite', array_merge($testSuiteConfig, array('prefix' => 'new_' . $testSuiteConfig['prefix'])));
$newTestSuiteDb = ConnectionManager::getDataSource('new_test_suite'); $newTestSuiteDb = ConnectionManager::getDataSource('new_test_suite');
@ -333,16 +331,12 @@ class CakeTestFixtureTest extends CakeTestCase {
$Source->create($newTestSuiteDb); $Source->create($newTestSuiteDb);
$Source->insert($newTestSuiteDb); $Source->insert($newTestSuiteDb);
$defaultDb->config = $newTestSuiteDb->config;
$Fixture = new CakeTestFixtureDefaultImportFixture(); $Fixture = new CakeTestFixtureDefaultImportFixture();
$Fixture->fields = $Fixture->records = null; $Fixture->fields = $Fixture->records = null;
$Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'new_test_suite'); $Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'new_test_suite');
$Fixture->init(); $Fixture->init();
$this->assertEqual(array_keys($Fixture->fields), array('id', 'name', 'created')); $this->assertEqual(array_keys($Fixture->fields), array('id', 'name', 'created'));
$defaultDb->config = $defaultConfig;
$keys = array_flip(ClassRegistry::keys()); $keys = array_flip(ClassRegistry::keys());
$this->assertFalse(array_key_exists('fixtureimporttestmodel', $keys)); $this->assertFalse(array_key_exists('fixtureimporttestmodel', $keys));