Permalink
Browse files

adding test for image in subdir and fullbase, closes #2534

  • Loading branch information...
1 parent c8eae93 commit 62df92934289f18314e9aed86c3d6c04c670f905 @ceeram ceeram committed Feb 1, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 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/'));

0 comments on commit 62df929

Please sign in to comment.