Permalink
Browse files

Merge pull request #105 from tPl0ch/2.0-bake-controller

Unloading TestPlugin in ShellTest
  • Loading branch information...
2 parents c5a2efc + 3c996bb commit 26dc6c80489835a767d1bb494ccb4b63d3a5a21a @ADmad ADmad committed May 29, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Cake/Test/Case/Console/Command/ShellTest.php
@@ -172,21 +172,22 @@ public function testInitialize() {
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
), true);
- CakePlugin::load('TestPlugin');
+ CakePlugin::load('TestPlugin');
$this->Shell->uses = array('TestPlugin.TestPluginPost');
$this->Shell->initialize();
$this->assertTrue(isset($this->Shell->TestPluginPost));
$this->assertInstanceOf('TestPluginPost', $this->Shell->TestPluginPost);
$this->assertEqual($this->Shell->modelClass, 'TestPluginPost');
+ CakePlugin::unload('TestPlugin');
$this->Shell->uses = array('Comment');
$this->Shell->initialize();
$this->assertTrue(isset($this->Shell->Comment));
$this->assertInstanceOf('Comment', $this->Shell->Comment);
$this->assertEqual($this->Shell->modelClass, 'Comment');
-
+
App::build();
}

0 comments on commit 26dc6c8

Please sign in to comment.