[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/tests/test_tools/simpletest/ -> exceptions.php (source)

   1  <?php
   2      /**
   3       *    base include file for SimpleTest
   4       *    @package    SimpleTest
   5       *    @subpackage    UnitTester
   6       *    @version    $Id: exceptions.php 1397 2006-09-07 07:55:53Z wei $
   7       */
   8  
   9      /**#@+
  10       * Includes SimpleTest files and defined the root constant
  11       * for dependent libraries.
  12       */
  13      require_once(dirname(__FILE__) . '/invoker.php');
  14  
  15      /**
  16       *    Extension that traps exceptions and turns them into
  17       *    an error message.
  18       *      @package SimpleTest
  19       *      @subpackage UnitTester
  20       */
  21      class SimpleExceptionTrappingInvoker extends SimpleInvokerDecorator {
  22  
  23          /**
  24           *    Stores the invoker to be wrapped.
  25           *    @param SimpleInvoker $invoker   Test method runner.
  26           */
  27          function SimpleExceptionTrappingInvoker($invoker) {
  28              $this->SimpleInvokerDecorator($invoker);
  29          }
  30  
  31          /**
  32           *    Invokes a test method and dispatches any
  33           *    untrapped errors.
  34           *    @param string $method    Test method to call.
  35           *    @access public
  36           */
  37          function invoke($method) {
  38              try {
  39                  parent::invoke($method);
  40              } catch (Exception $exception) {
  41                  $test_case = $this->getTestCase();
  42                  $test_case->exception($exception);
  43              }
  44          }
  45      }
  46  ?>


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7