Ejemplo n.º 1
0
 public function testStringificationReturnsDoctypeString()
 {
     $doctype = $this->helper->__invoke(Helper\Doctype::XHTML1_STRICT);
     $string   = $doctype->__toString();
     $registry = \Zend\Registry::get('Zend_View_Helper_Doctype');
     $this->assertEquals($registry['doctypes'][Helper\Doctype::XHTML1_STRICT], $string);
 }
Ejemplo n.º 2
0
 public function testIsRdfaReturnsTrueForRdfaDoctype()
 {
     $this->assertFalse($this->helper->isRdfa());
     $doctypes = array(Helper\Doctype::XHTML11, Helper\Doctype::XHTML1_STRICT, Helper\Doctype::XHTML1_TRANSITIONAL, Helper\Doctype::XHTML1_FRAMESET, Helper\Doctype::XHTML_BASIC1, Helper\Doctype::XHTML5, Helper\Doctype::HTML4_STRICT, Helper\Doctype::HTML4_LOOSE, Helper\Doctype::HTML4_FRAMESET, Helper\Doctype::HTML5);
     foreach ($doctypes as $type) {
         $this->assertFalse($this->helper->__invoke($type)->isRdfa());
     }
     $this->assertTrue($this->helper->__invoke(Helper\Doctype::XHTML1_RDFA1)->isRdfa());
 }
Ejemplo n.º 3
0
 public function testStringificationReturnsDoctypeString()
 {
     $doctype = $this->helper->__invoke(Helper\Doctype::XHTML1_STRICT);
     $string = $doctype->__toString();
     $this->assertEquals('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', $string);
 }