diff --git a/app/views/elements/email/html/empty b/app/views/elements/email/html/empty new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/elements/email/text/empty b/app/views/elements/email/text/empty new file mode 100644 index 000000000..e69de29bb diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 680f61ffb..c01d409e3 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -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); diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/cake/tests/cases/libs/view/helpers/html.test.php index 37e029efc..4cb252a2f 100644 --- a/cake/tests/cases/libs/view/helpers/html.test.php +++ b/cake/tests/cases/libs/view/helpers/html.test.php @@ -420,12 +420,18 @@ class HtmlHelperTest extends CakeTestCase { $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); } /**