src/Logging/JUnit/Writer.php
protected function appendCase(\DOMElement $suiteNode, TestCase $case): \DOMElement
    {
        $caseNode = $this->document->createElement('testcase');
        $vars = get_object_vars($case);
        foreach ($vars as $name => $value) {
            if (preg_match(static::$caseAttrs, $name)) {
                if ($this->isEmptyLineAttribute($name, $value)) {
                    continue;
                }
                $caseNode->setAttribute($name, (string) $value);
            }
        }
        $suiteNode->appendChild($caseNode);
        $this->appendDefects($caseNode, $case->failures, 'failure');
        $this->appendDefects($caseNode, $case->errors, 'error');

        return $caseNode;
    }
protected function appendCase(\DOMElement $suiteNode, TestCase $case): \DOMElement
    {
        $caseNode = $this->document->createElement('testcase');
        $vars = get_object_vars($case);
        foreach ($vars as $name => $value) {
            if (preg_match(static::$caseAttrs, $name)) {
                if ($this->isEmptyLineAttribute($name, $value)) {
                    continue;
                }
                $caseNode->setAttribute($name, (string) $value);
            }
        }
        $suiteNode->appendChild($caseNode);
        $this->appendDefects($caseNode, $case->failures, 'failure');
        $this->appendDefects($caseNode, $case->errors, 'error');

        return $caseNode;
    }
protected function appendCase ( \ DOMElement $ suiteNode , TestCase $ case ) : \ DOMElement { $ caseNode = $ this -> document -> createElement ( 'testcase' ) ; $ vars = get_object_vars ( $ case ) ; foreach ( $ vars as $ name => $ value ) { if ( preg_match ( static :: $ caseAttrs , $ name ) ) { if ( $ this -> isEmptyLineAttribute ( $ name , $ value ) ) { continue ; } $ caseNode -> setAttribute ( $ name , ( string ) $ value ) ; } } $ suiteNode -> appendChild ( $ caseNode ) ; $ this -> appendDefects ( $ caseNode , $ case -> failures , 'failure' ) ; $ this -> appendDefects ( $ caseNode , $ case -> errors , 'error' ) ; return $ caseNode ; }
Append a testcase node to the given testsuite
node.

@param $suiteNode
@param TestCase $case

@return \DOMElement
Append a testcase node to the given testsuite node .