|
|
@@ -355,6 +355,9 @@ class HtmlHelperTest extends CakeTestCase {
|
|
|
$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?one=two&three=four');
|
|
|
+ $this->assertTags($result, array('img' => array('src' => 'img/test.gif?one=two&three=four', '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' => '')));
|
|
|
@@ -515,6 +518,10 @@ class HtmlHelperTest extends CakeTestCase {
|
|
|
$expected['link']['href'] = 'preg:/.*css\/screen\.css\?1234/';
|
|
|
$this->assertTags($result, $expected);
|
|
|
|
|
|
+ $result = $this->Html->css('screen.css?with=param&other=param');
|
|
|
+ $expected['link']['href'] = 'css/screen.css?with=param&other=param';
|
|
|
+ $this->assertTags($result, $expected);
|
|
|
+
|
|
|
$result = $this->Html->css('http://whatever.com/screen.css?1234');
|
|
|
$expected['link']['href'] = 'preg:/http:\/\/.*\/screen\.css\?1234/';
|
|
|
$this->assertTags($result, $expected);
|
|
|
@@ -787,6 +794,12 @@ class HtmlHelperTest extends CakeTestCase {
|
|
|
);
|
|
|
$this->assertTags($result, $expected);
|
|
|
|
|
|
+ $result = $this->Html->script('test.json.js?foo=bar&other=test');
|
|
|
+ $expected = array(
|
|
|
+ 'script' => array('type' => 'text/javascript', 'src' => 'js/test.json.js?foo=bar&other=test')
|
|
|
+ );
|
|
|
+ $this->assertTags($result, $expected);
|
|
|
+
|
|
|
$result = $this->Html->script('foo');
|
|
|
$this->assertNull($result, 'Script returned upon duplicate inclusion %s');
|
|
|
|