g2 Mon, 20 Jul 2009 11:04:48 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=284429
Changed paths: U php/phpruntests/trunk/src/taskScheduler/rtTaskScheduler.php U php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterCSV.php U php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterList.php Log: bugfix outputwriter Modified: php/phpruntests/trunk/src/taskScheduler/rtTaskScheduler.php =================================================================== --- php/phpruntests/trunk/src/taskScheduler/rtTaskScheduler.php 2009-07-20 10:54:37 UTC (rev 284428) +++ php/phpruntests/trunk/src/taskScheduler/rtTaskScheduler.php 2009-07-20 11:04:48 UTC (rev 284429) @@ -131,7 +131,7 @@ $task->run(); $results = $task->getResult(); rtTestOutputWriter::flushResult($results, $this->reportStatus); - $this->resultList = array_merge($this->resultList, $results); + $this->resultList[] = $results; } return; Modified: php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterCSV.php =================================================================== --- php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterCSV.php 2009-07-20 10:54:37 UTC (rev 284428) +++ php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterCSV.php 2009-07-20 11:04:48 UTC (rev 284429) @@ -25,16 +25,22 @@ public function createOutput() { - foreach ($this->resultList as $testResult) { + foreach ($this->resultList as $testGroupResults) { + + foreach ($testGroupResults as $testResult) { + $outputString = $testResult->getName(); $testStatus = $testResult->getStatus(); - foreach($testStatus->getTestStateNames() as $name) { + + foreach($testStatus->getTestStateNames() as $name) { + if($testStatus->getValue($name)) { $outputString .= " , ". strtoupper($name); } } $this->output .= $outputString."\n"; } + } } } Modified: php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterList.php =================================================================== --- php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterList.php 2009-07-20 10:54:37 UTC (rev 284428) +++ php/phpruntests/trunk/src/testcase/output/rtTestOutputWriterList.php 2009-07-20 11:04:48 UTC (rev 284429) @@ -3,7 +3,7 @@ * rtTestOutputWriterList * * Write test output line by line - * + * * @category Testing * @package RUNTESTS * @author Zoe Slattery <z...@php.net> @@ -12,32 +12,37 @@ * @copyright 2009 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @link http://qa.php.net/ - * + * */ class rtTestOutputWriterList extends rtTestOutputWriter { public function __construct() { - $this->type = 'txt'; + $this->type = 'txt'; } - + public function createOutput() { - foreach ($this->resultList as $testResult) { - $outputString = ""; - $testStatus = $testResult->getStatus(); - - foreach($testStatus->getTestStateNames() as $name) { + foreach ($this->resultList as $testGroupResults) { + + foreach ($testGroupResults as $testResult) { - if ($testStatus->getValue($name)) { - $outputString .= " ". strtoupper($name); - $outputString .= " " . $testStatus->getMessage($name); - } - } - $outputString .= " " . $testResult->getTitle(); - $outputString .= " [" . $testResult->getName() . ".phpt]"; - $this->output .= $outputString."\n"; + $outputString = ""; + $testStatus = $testResult->getStatus(); + + foreach($testStatus->getTestStateNames() as $name) { + + if ($testStatus->getValue($name)) { + $outputString .= " ". strtoupper($name); + $outputString .= " " . $testStatus->getMessage($name); + } + } + + $outputString .= " " . $testResult->getTitle(); + $outputString .= " [" . $testResult->getName() . ".phpt]"; + $this->output .= $outputString."\n"; + } } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php