You are here

public function XMLTestBase::loadDocument in GraphQL 8.4

Loads a test document.

3 calls to XMLTestBase::loadDocument()
XMLAttributeTest::testXmlAttribute in tests/src/Kernel/DataProducer/XML/XMLAttributeTest.php
@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\XML\XMLAttribute::resolve
XMLContentTest::testXmlContent in tests/src/Kernel/DataProducer/XML/XMLContentTest.php
@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\XML\XMLContent::resolve
XMLXpathTest::testXmlXpath in tests/src/Kernel/DataProducer/XML/XMLXpathTest.php
@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\XML\XMLXpath::resolve

File

tests/src/Kernel/DataProducer/XML/XMLTestBase.php, line 17

Class

XMLTestBase
Base class for XML data producer tests.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer\XML

Code

public function loadDocument() : \DOMElement {
  $document = new \DOMDocument();
  libxml_use_internal_errors(TRUE);
  $document
    ->loadHTMLFile(drupal_get_path('module', 'graphql') . '/tests/files/xml/test.xml');
  return $document->documentElement;
}