New records could not hold multiple habtm associates using ::set(). Fixes #160.
[akelos.git] / vendor / simpletest / exceptions.php
blob59dcea0fbac4a1c4e614d1de9bb866a4368cf82a
1 <?php
2 /**
3 * base include file for SimpleTest
4 * @package SimpleTest
5 * @subpackage UnitTester
6 * @version $Id: exceptions.php,v 1.1 2006/02/06 06:05:18 lastcraft Exp $
7 */
9 /**#@+
10 * Includes SimpleTest files and defined the root constant
11 * for dependent libraries.
13 require_once(dirname(__FILE__) . '/invoker.php');
15 /**
16 * Extension that traps exceptions and turns them into
17 * an error message.
18 * @package SimpleTest
19 * @subpackage UnitTester
21 class SimpleExceptionTrappingInvoker extends SimpleInvokerDecorator {
23 /**
24 * Stores the invoker to be wrapped.
25 * @param SimpleInvoker $invoker Test method runner.
27 function SimpleExceptionTrappingInvoker($invoker) {
28 $this->SimpleInvokerDecorator($invoker);
31 /**
32 * Invokes a test method and dispatches any
33 * untrapped errors.
34 * @param string $method Test method to call.
35 * @access public
37 function invoke($method) {
38 try {
39 parent::invoke($method);
40 } catch (Exception $exception) {
41 $test_case = &$this->getTestCase();
42 $test_case->exception($exception);