Skip to content

Commit

Permalink
Add test for css() and script() with the same resource identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
rchavik committed Nov 19, 2014
1 parent e00aa59 commit 7bea96f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
Expand Up @@ -899,6 +899,22 @@ public function testPluginCssTimestamping() {
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.
*
Expand Down

0 comments on commit 7bea96f

Please sign in to comment.