mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 04:52:42 +00:00
Merge pull request #89 from sitedyno/2.0-cakeplugin-tests
2.0 cakeplugin tests
This commit is contained in:
commit
a718b1d91c
1 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,7 @@ class CakePluginTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), true);
|
||||||
|
App::objects('plugins', null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,6 +28,7 @@ class CakePluginTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
App::build();
|
App::build();
|
||||||
|
App::objects('plugins', null, false);
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
Configure::delete('CakePluginTest');
|
Configure::delete('CakePluginTest');
|
||||||
}
|
}
|
||||||
|
@ -37,6 +39,7 @@ class CakePluginTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testLoadSingle() {
|
public function testLoadSingle() {
|
||||||
|
CakePlugin::unload();
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
$expected = array('TestPlugin');
|
$expected = array('TestPlugin');
|
||||||
$this->assertEquals($expected, CakePlugin::loaded());
|
$this->assertEquals($expected, CakePlugin::loaded());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue