Changeset 1953 for trunk/buildscripts/phing/classes/phing/tasks/ext/simpletest/SimpleTestFormatterElement.php
- Timestamp:
- 05/15/2007 08:54:57 PM (20 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/buildscripts/phing/classes/phing/tasks/ext/simpletest/SimpleTestFormatterElement.php
r1186 r1953 22 22 require_once 'phing/tasks/ext/simpletest/SimpleTestPlainResultFormatter.php'; 23 23 require_once 'phing/tasks/ext/simpletest/SimpleTestSummaryResultFormatter.php'; 24 require_once 'phing/tasks/ext/ phpunit2/FormatterElement.php';24 require_once 'phing/tasks/ext/simpletest/SimpleTestXmlResultFormatter.php'; 25 25 26 26 /** … … 33 33 * @since 2.2.0 34 34 */ 35 class SimpleTestFormatterElement extends FormatterElement35 class SimpleTestFormatterElement 36 36 { 37 protected $formatter = NULL; 38 39 protected $type = ""; 40 41 protected $useFile = true; 42 43 protected $toDir = "."; 44 45 protected $outfile = ""; 46 37 47 function setType($type) 38 48 { … … 41 51 if ($this->type == "xml") 42 52 { 43 $destFile = new PhingFile($this->toDir, 'testsuites.xml');44 //$this->formatter = new SimpleTestXmlResultFormatter();53 //$destFile = new PhingFile($this->toDir, 'testsuites.xml'); 54 $this->formatter = new SimpleTestXmlResultFormatter(); 45 55 } 46 56 else … … 59 69 } 60 70 } 71 72 function setClassName($className) 73 { 74 $classNameNoDot = Phing::import($className); 75 76 $this->formatter = new $classNameNoDot(); 77 } 78 79 function setUseFile($useFile) 80 { 81 $this->useFile = $useFile; 82 } 83 84 function getUseFile() 85 { 86 return $this->useFile; 87 } 88 89 function setToDir($toDir) 90 { 91 $this->toDir = $toDir; 92 } 93 94 function getToDir() 95 { 96 return $this->toDir; 97 } 98 99 function setOutfile($outfile) 100 { 101 $this->outfile = $outfile; 102 } 103 104 function getOutfile() 105 { 106 if ($this->outfile) 107 { 108 return $this->outfile; 109 } 110 else 111 { 112 return $this->formatter->getPreferredOutfile() . $this->getExtension(); 113 } 114 } 115 116 function getExtension() 117 { 118 return $this->formatter->getExtension(); 119 } 120 121 function getFormatter() 122 { 123 return $this->formatter; 124 } 61 125 } 62 126 ?>
