Fixing failing tests when HtmlHelper test was run by itself.

This commit is contained in:
mark_story 2010-11-16 22:52:49 -05:00
parent 47f6a29998
commit ba10003ef2

View file

@ -90,6 +90,8 @@ class HtmlHelperTest extends CakeTestCase {
$this->Html = new HtmlHelper($this->View); $this->Html = new HtmlHelper($this->View);
$this->Html->request = new CakeRequest(null, false); $this->Html->request = new CakeRequest(null, false);
$this->Html->request->webroot = ''; $this->Html->request->webroot = '';
Configure::write('Asset.timestamp', false);
} }
/** /**
@ -262,7 +264,6 @@ class HtmlHelperTest extends CakeTestCase {
*/ */
function testImageTag() { function testImageTag() {
$this->Html->request->webroot = ''; $this->Html->request->webroot = '';
Configure::write('Asset.timestamp', false);
$result = $this->Html->image('test.gif'); $result = $this->Html->image('test.gif');
$this->assertTags($result, array('img' => array('src' => 'img/test.gif', 'alt' => ''))); $this->assertTags($result, array('img' => array('src' => 'img/test.gif', 'alt' => '')));
@ -354,7 +355,6 @@ class HtmlHelperTest extends CakeTestCase {
* @return void * @return void
*/ */
function testThemeAssetsInMainWebrootPath() { function testThemeAssetsInMainWebrootPath() {
Configure::write('Asset.timestamp', false);
App::build(array( App::build(array(
'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)
)); ));
@ -402,7 +402,6 @@ class HtmlHelperTest extends CakeTestCase {
* @return void * @return void
*/ */
function testCssLink() { function testCssLink() {
Configure::write('Asset.timestamp', false);
Configure::write('Asset.filter.css', false); Configure::write('Asset.filter.css', false);
$result = $this->Html->css('screen'); $result = $this->Html->css('screen');
@ -528,7 +527,6 @@ class HtmlHelperTest extends CakeTestCase {
* @return void * @return void
*/ */
function testScript() { function testScript() {
Configure::write('Asset.timestamp', false);
$result = $this->Html->script('foo'); $result = $this->Html->script('foo');
$expected = array( $expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'js/foo.js') 'script' => array('type' => 'text/javascript', 'src' => 'js/foo.js')