Add test for css() and script() with the same resource identifier

This commit is contained in:
Rachman Chavik 2014-11-19 10:54:56 +07:00
parent e00aa596b1
commit 7bea96f534

View file

@ -899,6 +899,22 @@ class HtmlHelperTest extends CakeTestCase {
CakePlugin::unload('TestPlugin');
}
/**
* Resource names must be treated differently for css() and script()
*
* @return void
*/
public function testBufferedCssAndScriptWithIdenticalResourceName() {
$this->View->expects($this->at(0))
->method('append')
->with('css', $this->stringContains('test.min.css'));
$this->View->expects($this->at(1))
->method('append')
->with('script', $this->stringContains('test.min.js'));
$this->Html->css('test.min', array('inline' => false));
$this->Html->script('test.min', array('inline' => false));
}
/**
* test timestamp enforcement for script tags.
*