Fix test for HtmlHelper::link

This commit is contained in:
Cauan Cabral 2012-01-17 23:15:11 -03:00
parent 0c0135ff5e
commit d2315ef35b

View file

@ -315,18 +315,19 @@ class HtmlHelperTest extends CakeTestCase {
Configure::write('Asset.timestamp', 'force');
$result = $this->Html->link($this->Html->image('../favicon.ico'), '#', array('escape' => false));
$result = $this->Html->link($this->Html->image('../favicon.ico'), '#', array('escape' => false));
$expected = array(
'a' => array('href' => '#'),
'img' => array('src' => 'preg:/img\/..\/favicon\.ico\?\d*/', 'alt' => ''),
'img' => array('src' => 'img/../favicon.ico', 'alt' => ''),
'/a'
);
$this->assertTags($result, $expected);
$result = $this->Html->image('../favicon.ico', array('url' => '#'));
$expected = array(
'a' => array('href' => '#'),
'img' => array('src' => 'preg:/img\/..\/favicon\.ico\?\d*/', 'alt' => ''),
'img' => array('src' => 'img/../favicon.ico', 'alt' => ''),
'/a'
);
$this->assertTags($result, $expected);