Skip to content

Commit

Permalink
Addition to commit a80d82e. Adding unloading of TestPlugin in ShellTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Ploch committed May 29, 2011
1 parent c5a2efc commit 3c996bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Cake/Test/Case/Console/Command/ShellTest.php
Expand Up @@ -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();
}

Expand Down

0 comments on commit 3c996bb

Please sign in to comment.