mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge pull request #105 from tPl0ch/2.0-bake-controller
Unloading TestPlugin in ShellTest
This commit is contained in:
commit
26dc6c8048
1 changed files with 3 additions and 2 deletions
|
@ -172,21 +172,22 @@ class ShellTest extends CakeTestCase {
|
|||
'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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue