diff --git a/lib/Cake/tests/Case/Model/CakeSchemaTest.php b/lib/Cake/tests/Case/Model/CakeSchemaTest.php index f2b17f212fa..5f1a5ab051e 100644 --- a/lib/Cake/tests/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/tests/Case/Model/CakeSchemaTest.php @@ -528,6 +528,7 @@ function tearDown() { parent::tearDown(); @unlink(TMP . 'tests' . DS .'schema.php'); unset($this->Schema); + CakePlugin::unload(); } /** @@ -666,6 +667,7 @@ function testSchemaReadWithPlugins() { App::build(array( 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); + CakePlugin::load('TestPlugin'); $Schema = new CakeSchema(); $Schema->plugin = 'TestPlugin'; @@ -984,6 +986,7 @@ function testSchemaLoadingFromPlugin() { App::build(array( 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); + CakePlugin::load('TestPlugin'); $Other = $this->Schema->load(array('name' => 'TestPluginApp', 'plugin' => 'TestPlugin')); $this->assertEqual($Other->name, 'TestPluginApp'); $this->assertEqual(array_keys($Other->tables), array('test_plugin_acos')); diff --git a/lib/Cake/tests/Case/Model/ConnectionManagerTest.php b/lib/Cake/tests/Case/Model/ConnectionManagerTest.php index 5b0291520af..4f3e7e63c6c 100644 --- a/lib/Cake/tests/Case/Model/ConnectionManagerTest.php +++ b/lib/Cake/tests/Case/Model/ConnectionManagerTest.php @@ -25,6 +25,15 @@ */ class ConnectionManagerTest extends CakeTestCase { + +/** + * tearDown method + * + * @return void + */ + public function tearDown() { + CakePlugin::unload(); + } /** * testEnumConnectionObjects method * @@ -73,7 +82,7 @@ function testGetPluginDataSource() { App::build(array( 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); - + CakePlugin::load('TestPlugin'); $name = 'test_source'; $config = array('datasource' => 'TestPlugin.TestSource'); $connection = ConnectionManager::create($name, $config); @@ -95,7 +104,7 @@ function testGetPluginDataSourceAndPluginDriver() { App::build(array( 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); - + CakePlugin::load('TestPlugin'); $name = 'test_plugin_source_and_driver'; $config = array('datasource' => 'TestPlugin.Database/TestDriver'); @@ -119,7 +128,7 @@ function testGetLocalDataSourceAndPluginDriver() { App::build(array( 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); - + CakePlugin::load('TestPlugin'); $name = 'test_local_source_and_plugin_driver'; $config = array('datasource' => 'TestPlugin.Database/DboDummy'); @@ -268,7 +277,7 @@ function testConnectionData() { LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS ) )); - + CakePlugin::loadAll(); $expected = array( 'datasource' => 'Test2Source' );