cvs: pear /PHPUnit2/Framework TestResult.php /PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree Node.php
| From: | Sebastian Bergmann | Date: | Sun, 26 Feb 2006 21:34:40 +0000 |
| Subject: | cvs: pear /PHPUnit2/Framework TestResult.php /PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree Node.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38652@lists.php.net to get a copy of this message | ||
sebastian Sun Feb 26 21:34:40 2006 UTC
Modified files:
/pear/PHPUnit2/Framework TestResult.php
/pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree Node.php
Log:
Store the complete PHPUnit2_Framework_TestSuite object.
http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Framework/TestResult.php?r1=1.43&r2=1.44&diff_format=u
Index: pear/PHPUnit2/Framework/TestResult.php
diff -u pear/PHPUnit2/Framework/TestResult.php:1.43 pear/PHPUnit2/Framework/TestResult.php:1.44
--- pear/PHPUnit2/Framework/TestResult.php:1.43 Sat Feb 25 12:52:45 2006
+++ pear/PHPUnit2/Framework/TestResult.php Sun Feb 26 21:34:40 2006
@@ -41,7 +41,7 @@
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php
BSD License
- * @version CVS: $Id: TestResult.php,v 1.43 2006/02/25 12:52:45 sebastian Exp $
+ * @version CVS: $Id: TestResult.php,v 1.44 2006/02/26 21:34:40 sebastian Exp $
* @link http://pear.php.net/package/PHPUnit2
* @since File available since Release 2.0.0
*/
@@ -115,10 +115,10 @@
protected $runTests = 0;
/**
- * @var string
+ * @var PHPUnit2_Framework_TestSuite
* @access protected
*/
- protected $testSuiteName = '';
+ protected $topTestSuite = NULL;
/**
* Code Coverage information provided by Xdebug.
@@ -245,8 +245,8 @@
*/
public function startTestSuite(PHPUnit2_Framework_TestSuite $suite)
{
- if (empty($this->testSuiteName)) {
- $this->testSuiteName = $suite->getName();
+ if ($this->topTestSuite === NULL) {
+ $this->topTestSuite = $suite;
}
foreach ($this->listeners as $listener) {
@@ -410,15 +410,15 @@
}
/**
- * Returns the (top) test suite's name.
+ * Returns the (top) test suite.
*
- * @return string
+ * @return PHPUnit2_Framework_TestSuite
* @access public
* @since Method available since Release 3.0.0
*/
- public function testSuiteName()
+ public function topTestSuite()
{
- return $this->testSuiteName;
+ return $this->topTestSuite;
}
/**
http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree/Node.php?r1=1.10&r2=1.11&diff_format=u
Index: pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree/Node.php
diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree/Node.php:1.10
pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree/Node.php:1.11
--- pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree/Node.php:1.10 Sun Feb 26 06:44:46 2006
+++ pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML/Tree/Node.php Sun Feb 26 21:34:40 2006
@@ -41,7 +41,7 @@
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php
BSD License
- * @version CVS: $Id: Node.php,v 1.10 2006/02/26 06:44:46 sebastian Exp $
+ * @version CVS: $Id: Node.php,v 1.11 2006/02/26 21:34:40 sebastian Exp $
* @link http://pear.php.net/package/PHPUnit2
* @since File available since Release 3.0.0
*/
@@ -246,7 +246,7 @@
'xdebug_version',
),
array(
- $this->result->testSuiteName(),
+ $this->result->topTestSuite()->getName(),
$this->getLink(FALSE, TRUE),
$this->getNumExecutableLines(),
$this->getNumExecutedLines(),