cvs: pear(ZEND_ENGINE_2) /PHPUnit/PHPUnit TestCase.php
| From: | Sebastian Bergmann | Date: | Sat, 23 Nov 2002 07:38:16 +0000 |
| Subject: | cvs: pear(ZEND_ENGINE_2) /PHPUnit/PHPUnit TestCase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7543@lists.php.net to get a copy of this message | ||
sebastian Sat Nov 23 02:38:16 2002 EDT
Modified files: (Branch: ZEND_ENGINE_2)
/pear/PHPUnit/PHPUnit TestCase.php
Log:
Catch exceptions.
Index: pear/PHPUnit/PHPUnit/TestCase.php
diff -u pear/PHPUnit/PHPUnit/TestCase.php:1.2.2.6 pear/PHPUnit/PHPUnit/TestCase.php:1.2.2.7
--- pear/PHPUnit/PHPUnit/TestCase.php:1.2.2.6 Fri Nov 22 12:58:08 2002
+++ pear/PHPUnit/PHPUnit/TestCase.php Sat Nov 23 02:38:16 2002
@@ -12,7 +12,7 @@
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
//
-// $Id: TestCase.php,v 1.2.2.6 2002/11/22 17:58:08 sebastian Exp $
+// $Id: TestCase.php,v 1.2.2.7 2002/11/23 07:38:16 sebastian Exp $
//
require_once 'PHPUnit/Assert.php';
@@ -145,9 +145,15 @@
* @access public
*/
function runBare() {
- $this->setUp();
- $this->runTest();
- $this->tearDown();
+ try {
+ $this->setUp();
+ $this->runTest();
+ $this->tearDown();
+ }
+
+ catch (Exception $e) {
+ $this->result->addError($this, $e);
+ }
}
// }}}