Changeset 971
- Timestamp:
- 07/25/08 15:11:09 (3 months ago)
- Files:
-
- branches/arnoschn/cache/CiReportTask.php (modified) (1 diff)
- branches/arnoschn/cache/test/xinc-unit.php (modified) (1 diff)
- branches/arnoschn/cache/vendor/simpletest-tools/xmlreporter.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/arnoschn/cache/CiReportTask.php
r966 r971 48 48 $failures += (int)$attributes->failures; 49 49 $errors += (int)$attributes->errors; 50 $time += ( int)$attributes->time;50 $time += (float)$attributes->time; 51 51 } 52 52 $environment = array(); branches/arnoschn/cache/test/xinc-unit.php
r914 r971 44 44 $phpversion = isset($_SERVER['argv'][3])?$_SERVER['argv'][3]:'php5'; 45 45 $backend = isset($_SERVER['argv'][4])?$_SERVER['argv'][4]:'mysql'; 46 ob_start();47 46 $writeXml=true; 48 $run = $test->run(new XmlReporter('UTF-8',$phpversion,$backend)); 47 $reporter = new XmlReporter('UTF-8',$phpversion,$backend); 48 $run = $test->run($reporter); 49 49 } else { 50 $run = $test->run(new TextReporter()); 50 $reporter = new TextReporter(); 51 $run = $test->run($reporter); 51 52 } 52 53 53 54 if ($writeXml) { 54 $contents = ob_get_clean();55 $contents = $reporter->getXml(); 55 56 file_put_contents($file,$contents); 56 57 } branches/arnoschn/cache/vendor/simpletest-tools/xmlreporter.php
r929 r971 1 1 <?php 2 2 require_once(AK_VENDOR_DIR.DS.'simpletest'.DS.'reporter.php'); 3 class XmlReporter extends SimpleReporter {3 class XmlReporter extends TextReporter { 4 4 5 5 var $group_tests = array(); … … 13 13 var $phpversion; 14 14 var $backend; 15 var $_outstring; 15 16 function XmlReporter($character_set = 'ISO-8859-1', $phpversion='php5', $backend='mysql') { 16 17 $this->SimpleReporter(); … … 160 161 $this->group_depth++; 161 162 } 162 163 function getXml() 164 { 165 return $this->_outstring; 166 } 163 167 /** 164 168 * Paints the end of a group test. Will paint the page … … 176 180 $phpversion='php5'; 177 181 $backend="mysql"; 178 echo'<?xml version="1.0" encoding="'.$this->_character_set.'"?>182 $this->_outstring='<?xml version="1.0" encoding="'.$this->_character_set.'"?> 179 183 <testsuites php-version="'.$this->phpversion.'" backend="'.$this->backend.'">'; 180 184 //foreach ($this->output as $level=>$out) { 181 echoimplode("\n",$this->output);185 $this->_outstring.=implode("\n",$this->output); 182 186 //} 183 echo '</testsuites>'; 187 $this->_outstring.='</testsuites>'; 188 unset($this->output); 189 $this->output=array(); 190 unset($this->_out); 191 $this->_out=array(); 184 192 } else if ($this->group_depth==1) { 185 193 $time = time()+microtime(true) - $this->_starttime;
