Added test for #2361

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4809 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2007-04-06 19:12:15 +00:00
parent 980e713df7
commit 8b2e2e6a7a

View file

@ -42,10 +42,17 @@ class HtmlHelperTest extends UnitTestCase {
var $html = null;
function setUp() {
$this->Html = new HtmlHelper();
$view = new View(new TheHtmlTestController());
$this->Html =& new HtmlHelper();
$view =& new View(new TheHtmlTestController());
ClassRegistry::addObject('view', $view);
}
function testImageLink() {
$result = $this->Html->link($this->Html->image('test.gif'), '#', array(), false, false, false);
$expected = '/^<a href="#"\s+><img\s+src="img\/test.gif"\s+alt=""\s+\/><\/a>$/';
$this->assertPattern($expected, $result);
}
function tearDown() {
unset($this->Html);