Skip to content

Commit

Permalink
Fixing failing tests cased by App::object() cache being warm.
Browse files Browse the repository at this point in the history
Removing code duplicated in CakeTestCase methods.
Adding missing parent calls.
  • Loading branch information
markstory committed Aug 31, 2011
1 parent 572412e commit 4d1f41d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/View/ThemeViewTest.php
Expand Up @@ -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);
Expand All @@ -114,6 +114,7 @@ public function setUp() {
'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();
}

Expand All @@ -123,11 +124,10 @@ public function setUp() {
* @return void
*/
public function tearDown() {
parent::tearDown();
unset($this->ThemeView);
unset($this->PostsController);
unset($this->Controller);
ClassRegistry::flush();
App::build();
CakePlugin::unload();
}

Expand Down

0 comments on commit 4d1f41d

Please sign in to comment.