cvs: pear /PHPUnit PHPUnit_TestDecorator.php

From: Date: Thu, 11 Jul 2002 17:10:15 +0000
Subject: cvs: pear /PHPUnit PHPUnit_TestDecorator.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5048@lists.php.net to get a copy of this message
sebastian Thu Jul 11 13:10:15 2002 EDT Modified files: /pear/PHPUnit PHPUnit_TestDecorator.php Log: More work on PHPUnit_TestDecorator. Index: pear/PHPUnit/PHPUnit_TestDecorator.php diff -u pear/PHPUnit/PHPUnit_TestDecorator.php:1.1 pear/PHPUnit/PHPUnit_TestDecorator.php:1.2 --- pear/PHPUnit/PHPUnit_TestDecorator.php:1.1 Thu Jul 11 12:00:28 2002 +++ pear/PHPUnit/PHPUnit_TestDecorator.php Thu Jul 11 13:10:14 2002 @@ -16,7 +16,7 @@ // | Author: Sebastian Bergmann <sb@sebastian-bergmann.de> | // +----------------------------------------------------------------------+ // -// $Id: PHPUnit_TestDecorator.php,v 1.1 2002/07/11 16:00:28 sebastian Exp $ +// $Id: PHPUnit_TestDecorator.php,v 1.2 2002/07/11 17:10:14 sebastian Exp $ // require_once 'PHPUnit/PHPUnit_Assert.php'; @@ -42,6 +42,21 @@ var $_test = null; /** + * Constructor. + * + * @param object + * @access public + */ + function PHPUnit_TestDecorator(&$test) { + if (is_object($test) && + (is_a($test, 'PHPUnit_TestCase') || + is_a($test, 'PHPUnit_TestSuite'))) { + + $this->_test = $test; + } + } + + /** * Runs the test and collects the * result in a TestResult. * @@ -61,6 +76,7 @@ */ function countTestCases() { return $this->_test->countTestCases(); + } } /** @@ -79,10 +95,9 @@ * * @param object * @access public + * @abstract */ - function run(&$result) { - // ... - } + function run(&$result) { /* abstract */ } /** * Returns a string representation of the test.

« previous php.pear.cvs (#5048) next »