public static function PHPUnit_Framework_Assert::assertXmlFileEqualsXmlFile

Asserts that two XML files are equal.

@since Method available since Release 3.1.0

Parameters

string $expectedFile:

string $actualFile:

string $message:

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

File

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

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

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