diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index 26daf5918..5cb5801d6 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -193,6 +193,8 @@ class HelperTest extends CakeTestCase { * @return void */ public function setUp() { + parent::setUp(); + ClassRegistry::flush(); Router::reload(); $null = null; @@ -215,9 +217,11 @@ class HelperTest extends CakeTestCase { * @return void */ public function tearDown() { + parent::tearDown(); + Configure::delete('Asset'); + CakePlugin::unload(); unset($this->Helper, $this->View); - ClassRegistry::flush(); } /** @@ -565,9 +569,7 @@ class HelperTest extends CakeTestCase { * @return void */ public function testAssetTimestamp() { - $_timestamp = Configure::read('Asset.timestamp'); - $_debug = Configure::read('debug'); - + Configure::write('Foo.bar', 'test'); Configure::write('Asset.timestamp', false); $result = $this->Helper->assetTimestamp(CSS_URL . 'cake.generic.css'); $this->assertEquals(CSS_URL . 'cake.generic.css', $result); @@ -593,9 +595,6 @@ class HelperTest extends CakeTestCase { $this->Helper->request->webroot = '/some/dir/'; $result = $this->Helper->assetTimestamp('/some/dir/' . CSS_URL . 'cake.generic.css'); $this->assertRegExp('/' . preg_quote(CSS_URL . 'cake.generic.css?', '/') . '[0-9]+/', $result); - - Configure::write('debug', $_debug); - Configure::write('Asset.timestamp', $_timestamp); } /** @@ -605,8 +604,6 @@ class HelperTest extends CakeTestCase { */ public function testAssetUrl() { $this->Helper->webroot = ''; - $_timestamp = Configure::read('Asset.timestamp'); - $result = $this->Helper->assetUrl(array( 'controller' => 'js', 'action' => 'post', @@ -666,7 +663,6 @@ class HelperTest extends CakeTestCase { * @return void */ public function testAssetTimestampPluginsAndThemes() { - $timestamp = Configure::read('Asset.timestamp'); Configure::write('Asset.timestamp', 'force'); App::build(array( 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS), @@ -684,9 +680,6 @@ class HelperTest extends CakeTestCase { $result = $this->Helper->assetTimestamp('/theme/test_theme/js/non_existant.js'); $this->assertRegExp('#/theme/test_theme/js/non_existant.js\?$#', $result, 'No error on missing file'); - - App::build(); - Configure::write('Asset.timestamp', $timestamp); } /**