From 62df92934289f18314e9aed86c3d6c04c670f905 Mon Sep 17 00:00:00 2001 From: Ceeram Date: Wed, 1 Feb 2012 14:37:46 +0100 Subject: [PATCH] adding test for image in subdir and fullbase, closes #2534 --- lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 66d741d3883..ecbb75f6602 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -349,10 +349,14 @@ public function testImageTag() { $result = $this->Html->image('/test/view/1.gif'); $this->assertTags($result, array('img' => array('src' => '/test/view/1.gif', 'alt' => ''))); - + $result = $this->Html->image('test.gif', array('fullBase' => true)); $here = $this->Html->url('/', true); $this->assertTags($result, array('img' => array('src' => $here . 'img/test.gif', 'alt' => ''))); + + $result = $this->Html->image('sub/test.gif', array('fullBase' => true)); + $here = $this->Html->url('/', true); + $this->assertTags($result, array('img' => array('src' => $here . 'img/sub/test.gif', 'alt' => ''))); } /** @@ -684,7 +688,7 @@ public function testScriptWithBlocks() { $this->View->expects($this->at(1)) ->method('append') ->with('script', $this->matchesRegularExpression('/bool_false.js/')); - + $this->View->expects($this->at(2)) ->method('append') ->with('headScripts', $this->matchesRegularExpression('/second_script.js/'));