Permalink
Browse files

Merge branch 'hotfix/view-navigation-sitemap-test' of git://github.co…

…m/weierophinney/zf2 into weierophinney-hotfix/view-navigation-sitemap-test
  • Loading branch information...
ralphschindler committed Oct 5, 2012
2 parents 49af008 + 432fa40 commit baa861736b31c585914483a33d574ab84553e84e
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/ZendTest/View/Helper/Navigation/SitemapTest.php
@@ -10,6 +10,7 @@
namespace ZendTest\View\Helper\Navigation;
+use DOMDocument;
use Zend\View;
/**
@@ -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()

0 comments on commit baa8617

Please sign in to comment.