Skip to content

Commit 0d69cad

Browse files
Merge branch '8.5' into 9.6
2 parents 42f0096 + aca96fc commit 0d69cad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/TextUI/XmlConfiguration/Loader.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use function trim;
2727
use DOMDocument;
2828
use DOMElement;
29+
use DOMNode;
2930
use DOMNodeList;
3031
use DOMXPath;
3132
use PHPUnit\Runner\TestSuiteSorter;
@@ -749,6 +750,8 @@ private function readFilterFiles(string $filename, DOMXPath $xpath, string $quer
749750
$files = [];
750751

751752
foreach ($xpath->query($query) as $file) {
753+
assert($file instanceof DOMNode);
754+
752755
$filePath = (string) $file->textContent;
753756

754757
if ($filePath) {
@@ -775,10 +778,14 @@ private function parseGroupConfiguration(DOMXPath $xpath, string $root): Groups
775778
$exclude = [];
776779

777780
foreach ($xpath->query($root . '/include/group') as $group) {
781+
assert($group instanceof DOMNode);
782+
778783
$include[] = new Group((string) $group->textContent);
779784
}
780785

781786
foreach ($xpath->query($root . '/exclude/group') as $group) {
787+
assert($group instanceof DOMNode);
788+
782789
$exclude[] = new Group((string) $group->textContent);
783790
}
784791

@@ -848,6 +855,8 @@ private function php(string $filename, DOMXPath $xpath): Php
848855
$includePaths = [];
849856

850857
foreach ($xpath->query('php/includePath') as $includePath) {
858+
assert($includePath instanceof DOMNode);
859+
851860
$path = (string) $includePath->textContent;
852861

853862
if ($path) {

0 commit comments

Comments
 (0)