Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Loader.php

function Loader::load

Same name in this branch
  1. 11.1.x vendor/phpunit/phpunit/src/Util/Xml/Loader.php \PHPUnit\Util\Xml\Loader::load()

Throws

Exception

File

vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Loader.php, line 87

Class

Loader
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\TextUI\XmlConfiguration

Code

public function load(string $filename) : LoadedFromFileConfiguration {
    try {
        $document = (new XmlLoader())->loadFile($filename);
    } catch (XmlException $e) {
        throw new Exception($e->getMessage(), $e->getCode(), $e);
    }
    $xpath = new DOMXPath($document);
    try {
        $xsdFilename = (new SchemaFinder())->find(Version::series());
    } catch (CannotFindSchemaException $e) {
        throw new Exception($e->getMessage(), $e->getCode(), $e);
    }
    $configurationFileRealpath = realpath($filename);
    return new LoadedFromFileConfiguration($configurationFileRealpath, (new Validator())->validate($document, $xsdFilename), $this->extensions($xpath), $this->source($configurationFileRealpath, $xpath), $this->codeCoverage($configurationFileRealpath, $xpath), $this->groups($xpath), $this->logging($configurationFileRealpath, $xpath), $this->php($configurationFileRealpath, $xpath), $this->phpunit($configurationFileRealpath, $document), $this->testSuite($configurationFileRealpath, $xpath));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal