*/ class PradoUnitTestCase extends UnitTestCase { /** * Tests whether the given code results in an appropriate exception being raised. * @param string the PHP code to execute. must end with a semi-colon. * @param string the type of exception that should be raised. * @return boolean true */ public function assertException(string $code, string $exceptionType) { $ex = null; eval("try { $code } catch ($exceptionType \$e) { \$ex = \$e; }"); $this->assertIsA($ex, $exceptionType); } } ?>