Skip to content

Commit

Permalink
Just use original dom since it's there
Browse files Browse the repository at this point in the history
  • Loading branch information
dq5studios committed Oct 28, 2020
1 parent 157f14b commit e0e15c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/JunitReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static function makeTestsuite(array $issue_list, DOMDocument $dom, string
// No errors in this file
if (empty($issue_list)) {
$file_test_count = 1;
$testcase = $testsuite->ownerDocument->createElement("testcase");
$testcase = $dom->createElement("testcase");
$testcase->setAttribute("name", $file_path);
$testcase->setAttribute("classname", $classname);
$testsuite->appendChild($testcase);
Expand Down Expand Up @@ -182,12 +182,12 @@ public static function makeTestcase(

if ($issue->severity == Config::REPORT_ERROR) {
$failures++;
$failure = $testcase->ownerDocument->createElement("failure", $snippet);
$failure = $dom->createElement("failure", $snippet);
$failure->setAttribute("type", $issue->severity);
$failure->setAttribute("message", $message);
$testcase->appendChild($failure);
} elseif (self::$show_info) {
$skipped = $testcase->ownerDocument->createElement("skipped", $snippet);
$skipped = $dom->createElement("skipped", $snippet);
$testcase->appendChild($skipped);
}

Expand Down

0 comments on commit e0e15c4

Please sign in to comment.