Merge branch '1.3' into 1.3-misc

This commit is contained in:
mark_story 2009-11-06 09:25:11 -05:00
commit ab76cb1217
4 changed files with 9 additions and 3 deletions

View file

View file

View file

@ -406,7 +406,7 @@ class HtmlHelper extends AppHelper {
if ($rel == null) {
$rel = 'stylesheet';
}
$out = sprintf($this->tags['css'], $rel, $url, $this->_parseAttributes($options, null, '', ' '));
$out = sprintf($this->tags['css'], $rel, $url, $this->_parseAttributes($options, array('inline'), '', ' '));
}
$out = $this->output($out);

View file

@ -421,11 +421,17 @@ class HtmlHelperTest extends CakeTestCase {
$this->assertTags($result[1], $expected);
$this->assertEqual(count($result), 2);
$view =& ClassRegistry::getObject('view');
ClassRegistry::removeObject('view');
$view =& new HtmlHelperMockView();
ClassRegistry::addObject('view', $view);
$view->expectAt(0, 'addScript', array(new PatternExpectation('/css_in_head.css/')));
$result = $this->Html->css('css_in_head', null, array('inline' => false));
$this->assertNull($result);
$view =& ClassRegistry::getObject('view');
$view->expectAt(1, 'addScript', array(new NoPatternExpectation('/inline=""/')));
$result = $this->Html->css('more_css_in_head', null, array('inline' => false));
$this->assertNull($result);
}
/**