|
static | import (DOMElement $element) |
|
static | load ($actual, bool $isHtml=false, string $filename='', bool $xinclude=false, bool $strict=false) |
|
static | loadFile (string $filename, bool $isHtml=false, bool $xinclude=false, bool $strict=false) |
|
static | removeCharacterDataNodes (DOMNode $node) |
|
static | prepareString (string $string) |
|
static | xmlToVariable (DOMElement $element) |
|
◆ import()
static PHPUnit\Util\Xml::import |
( |
DOMElement |
$element | ) |
|
|
static |
◆ load()
static PHPUnit\Util\Xml::load |
( |
|
$actual, |
|
|
bool |
$isHtml = false , |
|
|
string |
$filename = '' , |
|
|
bool |
$xinclude = false , |
|
|
bool |
$strict = false |
|
) |
| |
|
static |
Load an $actual document into a DOMDocument. This is called from the selector assertions.
If $actual is already a DOMDocument, it is returned with no changes. Otherwise, $actual is loaded into a new DOMDocument as either HTML or XML, depending on the value of $isHtml. If $isHtml is false and $xinclude is true, xinclude is performed on the loaded DOMDocument.
Note: prior to PHPUnit 3.3.0, this method loaded a file and not a string as it currently does. To load a file into a DOMDocument, use loadFile() instead.
- Parameters
-
DOMDocument | string | $actual | |
- Exceptions
-
◆ loadFile()
static PHPUnit\Util\Xml::loadFile |
( |
string |
$filename, |
|
|
bool |
$isHtml = false , |
|
|
bool |
$xinclude = false , |
|
|
bool |
$strict = false |
|
) |
| |
|
static |
Loads an XML (or HTML) file into a DOMDocument object.
- Exceptions
-
◆ prepareString()
static PHPUnit\Util\Xml::prepareString |
( |
string |
$string | ) |
|
|
static |
Escapes a string for the use in XML documents
Any Unicode character is allowed, excluding the surrogate blocks, FFFE, and FFFF (not even as character reference).
- See also
- https://www.w3.org/TR/xml/#charsets
◆ removeCharacterDataNodes()
static PHPUnit\Util\Xml::removeCharacterDataNodes |
( |
DOMNode |
$node | ) |
|
|
static |
◆ xmlToVariable()
static PHPUnit\Util\Xml::xmlToVariable |
( |
DOMElement |
$element | ) |
|
|
static |
"Convert" a DOMElement object into a PHP variable.
The documentation for this class was generated from the following file:
- vendor/phpunit/phpunit/src/Util/Xml.php