Index: tests/Zend/View/Helper/DoctypeTest.php =================================================================== --- tests/Zend/View/Helper/DoctypeTest.php (revision 25022) +++ tests/Zend/View/Helper/DoctypeTest.php (working copy) @@ -117,7 +117,16 @@ public function testIsXhtmlReturnsTrueForXhtmlDoctypes() { - foreach (array('XHTML1_STRICT', 'XHTML1_TRANSITIONAL', 'XHTML1_FRAMESET', 'XHTML1_RDFA', 'XHTML5') as $type) { + $types = array( + 'XHTML1_STRICT', + 'XHTML1_TRANSITIONAL', + 'XHTML1_FRAMESET', + 'XHTML1_RDFA', + 'XHTML1_RDFA11', + 'XHTML5', + ); + + foreach ($types as $type) { $doctype = $this->helper->doctype($type); $this->assertEquals($type, $doctype->getDoctype()); $this->assertTrue($doctype->isXhtml()); @@ -141,27 +150,45 @@ $this->assertFalse($doctype->isXhtml()); } - public function testIsHtml5() { - foreach (array('HTML5', 'XHTML5') as $type) { + public function testIsHtml5() { + foreach (array('HTML5', 'XHTML5') as $type) { $doctype = $this->helper->doctype($type); $this->assertEquals($type, $doctype->getDoctype()); $this->assertTrue($doctype->isHtml5()); } - foreach (array('HTML4_STRICT', 'HTML4_LOOSE', 'HTML4_FRAMESET', 'XHTML1_STRICT', 'XHTML1_TRANSITIONAL', 'XHTML1_FRAMESET') as $type) { - $doctype = $this->helper->doctype($type); + $types = array( + 'HTML4_STRICT', + 'HTML4_LOOSE', + 'HTML4_FRAMESET', + 'XHTML1_STRICT', + 'XHTML1_TRANSITIONAL', + 'XHTML1_FRAMESET' + ); + + foreach ($types as $type) { + $doctype = $this->helper->doctype($type); $this->assertEquals($type, $doctype->getDoctype()); $this->assertFalse($doctype->isHtml5()); - } - } + } + } public function testIsRdfa() { - $doctype = $this->helper->doctype('XHTML1_RDFA'); - $this->assertTrue($doctype->isRdfa()); + $this->assertTrue($this->helper->doctype('XHTML1_RDFA')->isRdfa()); + $this->assertTrue($this->helper->doctype('XHTML1_RDFA11')->isRdfa()); // built-in doctypes - foreach (array('HTML4_STRICT', 'HTML4_LOOSE', 'HTML4_FRAMESET', 'XHTML1_STRICT', 'XHTML1_TRANSITIONAL', 'XHTML1_FRAMESET') as $type) { + $types = array( + 'HTML4_STRICT', + 'HTML4_LOOSE', + 'HTML4_FRAMESET', + 'XHTML1_STRICT', + 'XHTML1_TRANSITIONAL', + 'XHTML1_FRAMESET' + ); + + foreach ($types as $type) { $doctype = $this->helper->doctype($type); $this->assertFalse($doctype->isRdfa()); }