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

Commit

Permalink
Merge branch 'hotfix/view-navigation-sitemap-test' of git://github.co…
Browse files Browse the repository at this point in the history
…m/weierophinney/zf2 into weierophinney-hotfix/view-navigation-sitemap-test
  • Loading branch information
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/Helper/Navigation/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace ZendTest\View\Helper\Navigation;

use DOMDocument;
use Zend\View;

/**
Expand Down Expand Up @@ -198,7 +199,13 @@ public function testDisablingValidators()
$this->_helper->setUseSitemapValidators(false);

$expected = $this->_getExpected('sitemap/invalid.xml');
$this->assertEquals(trim($expected), $this->_helper->render($nav));

// using assertEqualXMLStructure to prevent differences in libxml from invalidating test
$expectedDom = new DOMDocument();
$receivedDom = new DOMDocument();
$expectedDom->loadXML($expected);
$receivedDom->loadXML($this->_helper->render($nav));
$this->assertEqualXMLStructure($expectedDom->documentElement, $receivedDom->documentElement);
}

public function testSetServerUrlRequiresValidUri()
Expand Down

0 comments on commit 04e956d

Please sign in to comment.