Cristiano Duarte wrote:
> Since we don't have finally, the current code is:
In PHPUnit I use the following code
public function runBare() {
$catchedException = null;
$this->setUp();
try {
$this->runTest();
}
catch (Exception $e) {
$catchedException = $e;
}
$this->tearDown();
// Workaround for missing "finally".
if ($catchedException !== null) {
throw $catchedException;
}
}
Works fine for me [tm].
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php