cvs: pear /PHPUnit2 package.xml /PHPUnit2/TextUI ResultPrinter.php
| From: | Sebastian Bergmann | Date: | Sat, 22 Oct 2005 09:13:32 +0000 |
| Subject: | cvs: pear /PHPUnit2 package.xml /PHPUnit2/TextUI ResultPrinter.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35769@lists.php.net to get a copy of this message | ||
sebastian Sat Oct 22 05:13:32 2005 EDT
Modified files:
/pear/PHPUnit2 package.xml
/pear/PHPUnit2/TextUI ResultPrinter.php
Log:
Change PHPUnit2_TextUI_ResultPrinter::printHeader() to sanely format the time elapsed as MM:SS.
http://cvs.php.net/diff.php/pear/PHPUnit2/package.xml?r1=1.126&r2=1.127&ty=u
Index: pear/PHPUnit2/package.xml
diff -u pear/PHPUnit2/package.xml:1.126 pear/PHPUnit2/package.xml:1.127
--- pear/PHPUnit2/package.xml:1.126 Thu Oct 20 02:26:45 2005
+++ pear/PHPUnit2/package.xml Sat Oct 22 05:13:28 2005
@@ -22,6 +22,8 @@
+ Added PHPUnit2_Framework_Assert::getNonPublicProperty() method to read non-public properties from
objects.
+* Changed PHPUnit2_TextUI_ResultPrinter::printHeader() to sanely format the time elapsed as MM:SS.
+
* PHPUnit2 now uses the Standard PHP Library (SPL)'s class loading functionality.
* PHPUnit2 now uses the Standard PHP Library (SPL)'s specialized exceptions
InvalidArgumentException and RuntimeException instead of the generic Exception exception class.
http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/ResultPrinter.php?r1=1.24&r2=1.25&ty=u
Index: pear/PHPUnit2/TextUI/ResultPrinter.php
diff -u pear/PHPUnit2/TextUI/ResultPrinter.php:1.24 pear/PHPUnit2/TextUI/ResultPrinter.php:1.25
--- pear/PHPUnit2/TextUI/ResultPrinter.php:1.24 Thu Oct 20 02:26:47 2005
+++ pear/PHPUnit2/TextUI/ResultPrinter.php Sat Oct 22 05:13:31 2005
@@ -15,7 +15,7 @@
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: ResultPrinter.php,v 1.24 2005/10/20 06:26:47 sebastian Exp $
+ * @version CVS: $Id: ResultPrinter.php,v 1.25 2005/10/22 09:13:31 sebastian Exp $
* @link http://pear.php.net/package/PHPUnit2
* @since File available since Release 2.0.0
*/
@@ -161,11 +161,14 @@
* @access protected
*/
protected function printHeader($timeElapsed) {
+ $minutes = ($timeElapsed >= 60) ? floor($timeElapsed / 60) : 0;
+
$this->write(
sprintf(
- "\n\nTime: %s\n",
+ "\n\nTime: %02s:%02s\n",
- $timeElapsed
+ $minutes,
+ $timeElapsed - $minutes * 60
)
);
}