예제 #1
0
 function __construct($stats)
 {
     parent::__construct($stats);
     $this->doc = new SimpleXMLElement("<testsuites></testsuites>");
     $this->testsuite = $this->doc->addChild("testsuite");
     $this->testsuite->addAttribute("id", 0);
     $this->testsuite->addAttribute("time", 0);
     $this->testsuite->addAttribute("name", "Tests");
     $this->testsuite->addAttribute("package", "lithium");
     $this->testsuite->addAttribute("tests", $this->stats['count']['asserts']);
     $this->testsuite->addAttribute("errors", $this->stats['count']['errors']);
     $this->testsuite->addAttribute("failures", $this->stats['count']['fails']);
     $this->testsuite->addAttribute("hostname", "localhost");
     // gets the timestamp of when the report was generated using ISO8601_DATETIME_PATTERN
     $this->testsuite->addAttribute("timestamp", substr(date(DateTime::ISO8601), 0, -5));
     $this->addAllErrors();
     $this->addAllFails();
     $this->addAllPasses();
 }
예제 #2
0
 function __construct($stats)
 {
     parent::__construct($stats);
     $this->buildReport();
 }