FUnit::report_xunit PHP Méthode

report_xunit() protected static méthode

This should definitely use one of the xml-specific build/output methods, but really... life is too short
See also: FUnit::report()
See also: FUnit::run()
protected static report_xunit ( array $tests )
$tests array
    protected static function report_xunit(array $tests)
    {
        $counts = static::test_stats($tests);
        $xml = "<?xml version=\"1.0\"?>\n";
        $xml .= "<testsuite tests=\"{$counts['total']}\">\n";
        foreach ($tests as $name => $tdata) {
            $xml .= "    <testcase classname=\"funit.{$name}\" name=\"{$name}\" time=\"0\">\n";
            if (!$tdata['pass']) {
                $xml .= "<failure/>";
            }
            $xml .= "</testcase>\n";
        }
        $xml .= "</testsuite>\n";
        FUnit::report_out($xml);
    }