Ticket #151: phing230_ext-phpunit-group.patch
| File phing230_ext-phpunit-group.patch, 1.4 kB (added by dirk.thomas@4wdmedia, 1 year ago) |
|---|
-
PHPUnitTask.php
old new 45 45 private $printsummary = false; 46 46 private $testfailed = false; 47 47 private $codecoverage = false; 48 private $group = false; 48 49 49 50 /** 50 51 * Initialize Task. … … 167 168 $this->codecoverage = $codecoverage; 168 169 } 169 170 171 function setGroup($group) 172 { 173 $this->group = $group; 174 } 175 170 176 /** 171 177 * Add a new formatter to all tests of this task. 172 178 * … … 262 268 */ 263 269 private function execute($suite) 264 270 { 265 $runner = new PHPUnitTestRunner($suite, $this->project );271 $runner = new PHPUnitTestRunner($suite, $this->project, $this->group); 266 272 267 273 $runner->setCodecoverage($this->codecoverage); 268 274 -
PHPUnitTestRunner.php
old new 46 46 47 47 private $project = NULL; 48 48 49 function __construct($suite, Project $project) 49 private $group = false; 50 51 function __construct($suite, Project $project, $group = false) 50 52 { 51 53 $this->suite = $suite; 52 54 $this->project = $project; 55 $this->group = $group; 53 56 $this->retCode = self::SUCCESS; 54 57 } 55 58 … … 88 91 $res->addListener($formatter); 89 92 } 90 93 91 $this->suite->run($res );94 $this->suite->run($res, false, $this->group); 92 95 93 96 if ($this->codecoverage) 94 97 {
