From 0809cae2940dfec03153cb2952d8d37741fb6f15 Mon Sep 17 00:00:00 2001 From: Andy Fowler Date: Thu, 17 Dec 2009 12:21:45 -0500 Subject: [PATCH] for zf-7724, adds 'XHTML5' as doctype, includes docs + tests --- .../de/module_specs/Zend_View-Helpers-Doctype.xml | 1 + .../en/module_specs/Zend_View-Helpers-Doctype.xml | 1 + .../fr/module_specs/Zend_View-Helpers-Doctype.xml | 4 ++++ .../he/module_specs/Zend_View-Helpers-Doctype.xml | 5 +++-- .../ja/module_specs/Zend_View-Helpers-Doctype.xml | 1 + .../pl/module_specs/Zend_View-Helpers-Doctype.xml | 1 + .../ru/module_specs/Zend_View-Helpers-Doctype.xml | 1 + .../zh/module_specs/Zend_View-Helpers-Doctype.xml | 1 + library/Zend/View/Helper/Doctype.php | 3 +++ tests/Zend/View/Helper/DoctypeTest.php | 4 ++-- 10 files changed, 18 insertions(+), 4 deletions(-) diff --git a/documentation/manual/de/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/de/module_specs/Zend_View-Helpers-Doctype.xml index 0f6ab03..5576307 100644 --- a/documentation/manual/de/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/de/module_specs/Zend_View-Helpers-Doctype.xml @@ -23,6 +23,7 @@ XHTML1_TRANSITIONAL XHTML_BASIC1 XHTML1_FRAMESET + XHTML5 HTML4_STRICT HTML4_LOOSE HTML4_FRAMESET diff --git a/documentation/manual/en/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/en/module_specs/Zend_View-Helpers-Doctype.xml index 9bcf495..17251b4 100644 --- a/documentation/manual/en/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/en/module_specs/Zend_View-Helpers-Doctype.xml @@ -22,6 +22,7 @@ XHTML1_TRANSITIONAL XHTML1_FRAMESET XHTML_BASIC1 + XHTML5 HTML4_STRICT HTML4_LOOSE HTML4_FRAMESET diff --git a/documentation/manual/fr/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/fr/module_specs/Zend_View-Helpers-Doctype.xml index dd81dbf..035ea0c 100644 --- a/documentation/manual/fr/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/fr/module_specs/Zend_View-Helpers-Doctype.xml @@ -35,6 +35,10 @@ XHTML_BASIC1 + + XHTML5 + + HTML4_STRICT diff --git a/documentation/manual/he/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/he/module_specs/Zend_View-Helpers-Doctype.xml index 34d9cc2..66e6237 100644 --- a/documentation/manual/he/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/he/module_specs/Zend_View-Helpers-Doctype.xml @@ -12,11 +12,12 @@ - XHTML11 + XHTML11 XHTML1_STRICT XHTML1_TRANSITIONAL XHTML1_FRAMESET - XHTML_BASIC1 + XHTML_BASIC1 + XHTML5 HTML4_STRICT HTML4_LOOSE HTML4_FRAMESET diff --git a/documentation/manual/ja/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/ja/module_specs/Zend_View-Helpers-Doctype.xml index c01c5ef..c2c4bfb 100644 --- a/documentation/manual/ja/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/ja/module_specs/Zend_View-Helpers-Doctype.xml @@ -24,6 +24,7 @@ XHTML1_TRANSITIONAL XHTML1_FRAMESET XHTML_BASIC1 + XHTML5 HTML4_STRICT HTML4_LOOSE HTML4_FRAMESET diff --git a/documentation/manual/pl/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/pl/module_specs/Zend_View-Helpers-Doctype.xml index 23f6377..a1a62f3 100644 --- a/documentation/manual/pl/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/pl/module_specs/Zend_View-Helpers-Doctype.xml @@ -21,6 +21,7 @@ XHTML1_TRANSITIONAL XHTML1_FRAMESET XHTML_BASIC1 + XHTML5 HTML4_STRICT HTML4_LOOSE HTML4_FRAMESET diff --git a/documentation/manual/ru/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/ru/module_specs/Zend_View-Helpers-Doctype.xml index 9844105..0d7fdb1 100644 --- a/documentation/manual/ru/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/ru/module_specs/Zend_View-Helpers-Doctype.xml @@ -23,6 +23,7 @@ XHTML1_TRANSITIONAL XHTML1_FRAMESET XHTML_BASIC1 + XHTML5 HTML4_STRICT HTML4_LOOSE HTML4_FRAMESET diff --git a/documentation/manual/zh/module_specs/Zend_View-Helpers-Doctype.xml b/documentation/manual/zh/module_specs/Zend_View-Helpers-Doctype.xml index b590e6d..7977065 100644 --- a/documentation/manual/zh/module_specs/Zend_View-Helpers-Doctype.xml +++ b/documentation/manual/zh/module_specs/Zend_View-Helpers-Doctype.xml @@ -15,6 +15,7 @@ XHTML1_TRANSITIONAL XHTML1_FRAMESET XHTML_BASIC1 + XHTML5 HTML4_STRICT HTML4_LOOSE HTML4_FRAMESET diff --git a/library/Zend/View/Helper/Doctype.php b/library/Zend/View/Helper/Doctype.php index 697eb70..97feacb 100644 --- a/library/Zend/View/Helper/Doctype.php +++ b/library/Zend/View/Helper/Doctype.php @@ -44,6 +44,7 @@ class Zend_View_Helper_Doctype extends Zend_View_Helper_Abstract const XHTML1_TRANSITIONAL = 'XHTML1_TRANSITIONAL'; const XHTML1_FRAMESET = 'XHTML1_FRAMESET'; const XHTML_BASIC1 = 'XHTML_BASIC1'; + const XHTML5 = 'XHTML5'; const HTML4_STRICT = 'HTML4_STRICT'; const HTML4_LOOSE = 'HTML4_LOOSE'; const HTML4_FRAMESET = 'HTML4_FRAMESET'; @@ -87,6 +88,7 @@ class Zend_View_Helper_Doctype extends Zend_View_Helper_Abstract self::XHTML1_TRANSITIONAL => '', self::XHTML1_FRAMESET => '', self::XHTML_BASIC1 => '', + self::XHTML5 => '', self::HTML4_STRICT => '', self::HTML4_LOOSE => '', self::HTML4_FRAMESET => '', @@ -115,6 +117,7 @@ class Zend_View_Helper_Doctype extends Zend_View_Helper_Abstract case self::XHTML1_TRANSITIONAL: case self::XHTML1_FRAMESET: case self::XHTML_BASIC1: + case self::XHTML5: case self::HTML4_STRICT: case self::HTML4_LOOSE: case self::HTML4_FRAMESET: diff --git a/tests/Zend/View/Helper/DoctypeTest.php b/tests/Zend/View/Helper/DoctypeTest.php index f5fe875..989e1eb 100644 --- a/tests/Zend/View/Helper/DoctypeTest.php +++ b/tests/Zend/View/Helper/DoctypeTest.php @@ -122,7 +122,7 @@ class Zend_View_Helper_DoctypeTest extends PHPUnit_Framework_TestCase public function testIsXhtmlReturnsTrueForXhtmlDoctypes() { - foreach (array('XHTML1_STRICT', 'XHTML1_TRANSITIONAL', 'XHTML1_FRAMESET') as $type) { + foreach (array('XHTML1_STRICT', 'XHTML1_TRANSITIONAL', 'XHTML1_FRAMESET', 'XHTML5') as $type) { $doctype = $this->helper->doctype($type); $this->assertEquals($type, $doctype->getDoctype()); $this->assertTrue($doctype->isXhtml()); @@ -135,7 +135,7 @@ class Zend_View_Helper_DoctypeTest extends PHPUnit_Framework_TestCase public function testIsXhtmlReturnsFalseForNonXhtmlDoctypes() { - foreach (array('HTML4_STRICT', 'HTML4_LOOSE', 'HTML4_FRAMESET') as $type) { + foreach (array('HTML4_STRICT', 'HTML4_LOOSE', 'HTML4_FRAMESET', 'HTML5') as $type) { $doctype = $this->helper->doctype($type); $this->assertEquals($type, $doctype->getDoctype()); $this->assertFalse($doctype->isXhtml()); -- 1.6.5.3