public static function PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile

Asserts that two XML documents are equal.

@since Method available since Release 3.3.0

Parameters

string $expectedFile:

string $actualXml:

string $message:

1 call to PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile()
Framework_AssertTest::testAssertXmlStringEqualsXmlFile in drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php, line 1684

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = '') {
  self::assertFileExists($expectedFile);
  $expected = new DOMDocument();
  $expected->preserveWhiteSpace = FALSE;
  $expected
    ->load($expectedFile);
  $actual = new DOMDocument();
  $actual->preserveWhiteSpace = FALSE;
  $actual
    ->loadXML($actualXml);
  self::assertEquals($expected, $actual, $message);
}