Browse files

Merge branch '1.3' into 1.3-misc

  • Loading branch information...
2 parents e7c2fe2 + e776cf1 commit ab76cb121771b0b0d41fe877ca913f45220ec4dd @markstory markstory committed Nov 6, 2009
View
0 app/views/elements/email/html/empty
No changes.
View
0 app/views/elements/email/text/empty
No changes.
View
2 cake/libs/view/helpers/html.php
@@ -406,7 +406,7 @@ function css($path, $rel = null, $options = array()) {
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
10 cake/tests/cases/libs/view/helpers/html.test.php
@@ -420,12 +420,18 @@ function testCssLink() {
$expected['link']['href'] = 'preg:/.*css\/vendor\.generic\.css/';
$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);
}
/**

0 comments on commit ab76cb1

Please sign in to comment.