mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing failing tests cased by App::object() cache being warm.
Removing code duplicated in CakeTestCase methods. Adding missing parent calls.
This commit is contained in:
parent
572412ec6b
commit
4d1f41dddc
1 changed files with 3 additions and 3 deletions
|
@ -103,7 +103,7 @@ class ThemeViewTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
Router::reload();
|
||||
parent::setUp();
|
||||
$request = new CakeRequest('posts/index');
|
||||
$this->Controller = new Controller($request);
|
||||
$this->PostsController = new ThemePostsController($request);
|
||||
|
@ -114,6 +114,7 @@ class ThemeViewTest extends CakeTestCase {
|
|||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
||||
));
|
||||
App::objects('plugins', null, false);
|
||||
CakePlugin::loadAll();
|
||||
}
|
||||
|
||||
|
@ -123,11 +124,10 @@ class ThemeViewTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
parent::tearDown();
|
||||
unset($this->ThemeView);
|
||||
unset($this->PostsController);
|
||||
unset($this->Controller);
|
||||
ClassRegistry::flush();
|
||||
App::build();
|
||||
CakePlugin::unload();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue