|
@@ -428,42 +428,42 @@ class Zend_View_Helper_HeadMetaTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
|
|
|
$test = $this->helper->toString();
|
|
$test = $this->helper->toString();
|
|
|
|
|
|
|
|
- $expected = '<meta name="keywords" content="foo" />
|
|
|
|
|
-<meta http-equiv="Cache-control" content="baz" />
|
|
|
|
|
-<meta name="description" content="foo" />
|
|
|
|
|
-<meta http-equiv="pragma" content="baz" />';
|
|
|
|
|
|
|
+ $expected = '<meta name="keywords" content="foo" />' . PHP_EOL
|
|
|
|
|
+ . '<meta http-equiv="Cache-control" content="baz" />' . PHP_EOL
|
|
|
|
|
+ . '<meta name="description" content="foo" />' . PHP_EOL
|
|
|
|
|
+ . '<meta http-equiv="pragma" content="baz" />';
|
|
|
|
|
|
|
|
$this->assertEquals($expected, $test);
|
|
$this->assertEquals($expected, $test);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @issue ZF-7722
|
|
* @issue ZF-7722
|
|
|
*/
|
|
*/
|
|
|
- public function testCharsetValidateFail()
|
|
|
|
|
|
|
+ public function testCharsetValidateFail()
|
|
|
{
|
|
{
|
|
|
$view = new Zend_View();
|
|
$view = new Zend_View();
|
|
|
$view->doctype('HTML4_STRICT');
|
|
$view->doctype('HTML4_STRICT');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
$view->headMeta()->setCharset('utf-8');
|
|
$view->headMeta()->setCharset('utf-8');
|
|
|
$this->fail('Should not be able to set charset for a HTML4 doctype');
|
|
$this->fail('Should not be able to set charset for a HTML4 doctype');
|
|
|
} catch (Zend_View_Exception $e) {}
|
|
} catch (Zend_View_Exception $e) {}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @issue ZF-7722
|
|
* @issue ZF-7722
|
|
|
*/
|
|
*/
|
|
|
public function testCharset() {
|
|
public function testCharset() {
|
|
|
$view = new Zend_View();
|
|
$view = new Zend_View();
|
|
|
$view->doctype('HTML5');
|
|
$view->doctype('HTML5');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$view->headMeta()->setCharset('utf-8');
|
|
$view->headMeta()->setCharset('utf-8');
|
|
|
$this->assertEquals(
|
|
$this->assertEquals(
|
|
|
'<meta charset="utf-8">',
|
|
'<meta charset="utf-8">',
|
|
|
$view->headMeta()->toString());
|
|
$view->headMeta()->toString());
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$view->doctype('XHTML5');
|
|
$view->doctype('XHTML5');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$this->assertEquals(
|
|
$this->assertEquals(
|
|
|
'<meta charset="utf-8"/>',
|
|
'<meta charset="utf-8"/>',
|
|
|
$view->headMeta()->toString());
|
|
$view->headMeta()->toString());
|