3 * base include file for SimpleTest
5 * @subpackage UnitTester
6 * @version $Id: exceptions.php,v 1.1 2006/02/06 06:05:18 lastcraft Exp $
10 * Includes SimpleTest files and defined the root constant
11 * for dependent libraries.
13 require_once(dirname(__FILE__
) . '/invoker.php');
16 * Extension that traps exceptions and turns them into
19 * @subpackage UnitTester
21 class SimpleExceptionTrappingInvoker
extends SimpleInvokerDecorator
{
24 * Stores the invoker to be wrapped.
25 * @param SimpleInvoker $invoker Test method runner.
27 function SimpleExceptionTrappingInvoker($invoker) {
28 $this->SimpleInvokerDecorator($invoker);
32 * Invokes a test method and dispatches any
34 * @param string $method Test method to call.
37 function invoke($method) {
39 parent
::invoke($method);
40 } catch (Exception
$exception) {
41 $test_case = &$this->getTestCase();
42 $test_case->exception($exception);