You are here

public static function PHPUnit_Util_XML::loadFile in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Util/XML.php \PHPUnit_Util_XML::loadFile()

Loads an XML (or HTML) file into a DOMDocument object.

@since Method available since Release 3.3.0

Parameters

string $filename:

bool $isHtml:

bool $xinclude:

bool $strict:

Return value

DOMDocument

5 calls to PHPUnit_Util_XML::loadFile()
PHPUnit_Framework_Assert::assertXmlFileEqualsXmlFile in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that two XML files are equal.
PHPUnit_Framework_Assert::assertXmlFileNotEqualsXmlFile in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that two XML files are not equal.
PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that two XML documents are equal.
PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlFile in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that two XML documents are not equal.
PHPUnit_Util_Configuration::__construct in vendor/phpunit/phpunit/src/Util/Configuration.php
Loads a PHPUnit configuration file.

File

vendor/phpunit/phpunit/src/Util/XML.php, line 51

Class

PHPUnit_Util_XML
XML helpers.

Code

public static function loadFile($filename, $isHtml = false, $xinclude = false, $strict = false) {
  $reporting = error_reporting(0);
  $contents = file_get_contents($filename);
  error_reporting($reporting);
  if ($contents === false) {
    throw new PHPUnit_Framework_Exception(sprintf('Could not read "%s".', $filename));
  }
  return self::load($contents, $isHtml, $filename, $xinclude, $strict);
}