Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'html5-rdfa' of https://github.com/bakura10/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Helper/Doctype.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function isHtml5()
*/
public function isRdfa()
{
return (stristr($this->getDoctype(), 'rdfa') ? true : false);
return ($this->isHtml5() || stristr($this->getDoctype(), 'rdfa') ? true : false);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions test/Helper/DoctypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public function testIsRdfa()

$this->assertTrue($this->helper->__invoke(Helper\Doctype::XHTML1_RDFA)->isRdfa());
$this->assertTrue($this->helper->__invoke(Helper\Doctype::XHTML1_RDFA11)->isRdfa());
$this->assertTrue($this->helper->__invoke(Helper\Doctype::XHTML5)->isRdfa());
$this->assertTrue($this->helper->__invoke(Helper\Doctype::HTML5)->isRdfa());

// build-in doctypes
$doctypes = array(
Expand All @@ -149,11 +151,9 @@ public function testIsRdfa()
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,
Helper\Doctype::HTML4_FRAMESET
);

foreach ($doctypes as $type) {
Expand Down

0 comments on commit 5c7001d

Please sign in to comment.