Fixing failing tests due to deleted assets.

This commit is contained in:
Mark Story 2010-01-13 23:47:31 -05:00
parent 8243afa383
commit 67b69b3106

View file

@ -301,23 +301,23 @@ class HtmlHelperTest extends CakeTestCase {
* *
* @return void * @return void
*/ */
function testImageTagWithTimestampping() { function testImageWithTimestampping() {
Configure::write('Asset.timestamp', 'force'); Configure::write('Asset.timestamp', 'force');
$result = $this->Html->image('cake.icon.gif'); $result = $this->Html->image('cake.icon.png');
$this->assertTags($result, array('img' => array('src' => 'preg:/img\/cake\.icon\.gif\?\d+/', 'alt' => ''))); $this->assertTags($result, array('img' => array('src' => 'preg:/img\/cake\.icon\.png\?\d+/', 'alt' => '')));
Configure::write('debug', 0); Configure::write('debug', 0);
Configure::write('Asset.timestamp', 'force'); Configure::write('Asset.timestamp', 'force');
$result = $this->Html->image('cake.icon.gif'); $result = $this->Html->image('cake.icon.png');
$this->assertTags($result, array('img' => array('src' => 'preg:/img\/cake\.icon\.gif\?\d+/', 'alt' => ''))); $this->assertTags($result, array('img' => array('src' => 'preg:/img\/cake\.icon\.png\?\d+/', 'alt' => '')));
$webroot = $this->Html->webroot; $webroot = $this->Html->webroot;
$this->Html->webroot = '/testing/longer/'; $this->Html->webroot = '/testing/longer/';
$result = $this->Html->image('cake.icon.gif'); $result = $this->Html->image('cake.icon.png');
$expected = array( $expected = array(
'img' => array('src' => 'preg:/\/testing\/longer\/img\/cake\.icon\.gif\?[0-9]+/', 'alt' => '') 'img' => array('src' => 'preg:/\/testing\/longer\/img\/cake\.icon\.png\?[0-9]+/', 'alt' => '')
); );
$this->assertTags($result, $expected); $this->assertTags($result, $expected);
$this->Html->webroot = $webroot; $this->Html->webroot = $webroot;