fixing fail in Html::meta(); and adding ClassRegistry::flush(); to fix no_database test group.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6207 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-12-23 01:07:10 +00:00
parent eebdb12eaa
commit a2624df5f2
2 changed files with 5 additions and 3 deletions

View file

@ -226,14 +226,15 @@ class HtmlHelper extends AppHelper {
$attributes = array_merge($type, $attributes); $attributes = array_merge($type, $attributes);
$out = null;
if (isset($attributes['link'])) { if (isset($attributes['link'])) {
if (isset($attributes['rel']) && $attributes['rel'] === 'icon') { if (isset($attributes['rel']) && $attributes['rel'] === 'icon') {
$out = sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link')));
$attributes['rel'] = 'shortcut icon'; $attributes['rel'] = 'shortcut icon';
$out .= sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link')));
} else { } else {
$attributes['link'] = $this->url($attributes['link'], true); $attributes['link'] = $this->url($attributes['link'], true);
} }
$out = sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link'))); $out .= sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link')));
} else { } else {
$out = sprintf($this->tags['meta'], $this->_parseAttributes($attributes, array('type'))); $out = sprintf($this->tags['meta'], $this->_parseAttributes($attributes, array('type')));
} }

View file

@ -102,6 +102,7 @@ class HelperTestPostsTag extends Model {
class HelperTest extends UnitTestCase { class HelperTest extends UnitTestCase {
function setUp() { function setUp() {
ClassRegistry::flush();
Router::reload(); Router::reload();
$null = null; $null = null;
$this->View = new View($null); $this->View = new View($null);