Exemplo n.º 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();
 }
Exemplo n.º 2
0
 function __construct($stats)
 {
     parent::__construct($stats);
     $this->buildReport();
 }
Exemplo n.º 3
0
 /**
  * Creates a new formatter instance.
  * @param string $format the name of the formatter.
  * @param array $params initial values to be applied to the formatter properties.
  * @return BaseFormatter the formatter.
  */
 protected function createFormatter($format, $params)
 {
     return BaseFormatter::createFormatter($format, $params);
 }
Exemplo n.º 4
0
 public function writeXML($xmlString)
 {
     parent::write(Datatypes::LONGXML_DATATYPE_V3);
     parent::writeUtf($xmlString, true);
 }
Exemplo n.º 5
0
 public function writeXML($xmlString)
 {
     parent::write(15);
     parent::writeUtf($xmlString);
 }