diff -u b/lib/Drupal/pgn/Tests/XmlEncoderUnitTest.php b/lib/Drupal/pgn/Tests/XmlEncoderUnitTest.php --- b/lib/Drupal/pgn/Tests/XmlEncoderUnitTest.php +++ b/lib/Drupal/pgn/Tests/XmlEncoderUnitTest.php @@ -10020,15 +10020,19 @@ ); } - protected function setUp() { - parent::setUp(); - $this->pgnxml = strtr($this->pgnxml, array("\n" => '')); - } - public function testXmlEncoder() { $encoder = new XmlEncoder(); $encoded = $encoder->encode($this->normalized, 'pgnxml', array('xml_root_node_name' => 'PGNGAMES')); - $this->assertIdentical($this->pgnxml, $encoded, 'Encoded PGN data is identical to expected PGNXML string value.'); + + $expected = new DOMDocument; + $expected->preserveWhiteSpace = FALSE; + $expected->loadXML($this->pgnxml); + + $actual = new DOMDocument; + $actual->preserveWhiteSpace = FALSE; + $actual->loadXML($encoded); + + $this->assertEqual($expected, $actual, 'Encoded PGN data is equal to expected PGNXML.'); } }