class RemoveLoggingElements
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@internal This class is not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\TextUI\XmlConfiguration\RemoveLoggingElements implements \PHPUnit\TextUI\XmlConfiguration\Migration
Expanded class hierarchy of RemoveLoggingElements
File
-
vendor/
phpunit/ phpunit/ src/ TextUI/ Configuration/ Xml/ Migration/ Migrations/ RemoveLoggingElements.php, line 21
Namespace
PHPUnit\TextUI\XmlConfigurationView source
final class RemoveLoggingElements implements Migration {
public function migrate(DOMDocument $document) : void {
$this->removeTestDoxElement($document);
$this->removeTextElement($document);
}
private function removeTestDoxElement(DOMDocument $document) : void {
$node = (new DOMXPath($document))->query('logging/testdoxXml')
->item(0);
if (!$node instanceof DOMElement || $node->parentNode === null) {
return;
}
$node->parentNode
->removeChild($node);
}
private function removeTextElement(DOMDocument $document) : void {
$node = (new DOMXPath($document))->query('logging/text')
->item(0);
if (!$node instanceof DOMElement || $node->parentNode === null) {
return;
}
$node->parentNode
->removeChild($node);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
RemoveLoggingElements::migrate | public | function | Overrides Migration::migrate | |
RemoveLoggingElements::removeTestDoxElement | private | function | ||
RemoveLoggingElements::removeTextElement | private | function |