protected function appendSuite(\DOMElement $root, TestSuite $suite): \DOMElement
    {
        $suiteNode = $this->document->createElement('testsuite');
        $vars = get_object_vars($suite);
        foreach ($vars as $name => $value) {
            if (preg_match(static::$suiteAttrs, $name)) {
                $suiteNode->setAttribute($name, (string) $value);
            }
        }
        $root->appendChild($suiteNode);

        return $suiteNode;
    }