PHPUnit_Util_XML::load
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.
- Author: Mike Naberezny <mike@maintainable.com>
Signature
public function load(string|DOMDocument
$actual,
[boolean
$isHtml = false,
[string
$filename = '',
[boolean
$xinclude = false,
[boolean
$strict = false]]]] )
Parameters
$actual
— object
$isHtml
— boolean$filename
— string$xinclude
— boolean$strict
— boolean
Returns
- DOMDocument
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
134 - 193 | CyclomaticComplexity | The method load() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10. |
134 - 193 | NPathComplexity | The method load() has an NPath complexity of 1728. The configured NPath complexity threshold is 200. |