Skip to content

Commit

Permalink
adding test for image in subdir and fullbase, closes #2534
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Feb 1, 2012
1 parent c8eae93 commit 62df929
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
Expand Up @@ -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' => '')));
}

/**
Expand Down Expand Up @@ -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/'));
Expand Down

0 comments on commit 62df929

Please sign in to comment.