 +          // Call afterClass method of the last test's class
 +          if ($current) foreach ($current->getMethods() as $m) {
 +            if (!$m->hasAnnotation('afterClass')) continue;
-+            $m->invoke(NULL, array());
++            try {
++              $m->invoke(NULL, array());
++            } catch (TargetInvocationException $ignored) { }
 +            break;
 +          }
 +        

Index: skeleton/unittest/TestSuite.class.php
===================================================================
--- skeleton/unittest/TestSuite.class.php	(revision 11672)
+++ skeleton/unittest/TestSuite.class.php	(working copy)
@@ -39,6 +39,7 @@
       $tests     = array();

      * Sets up this test. Throws a PrerequisitesNotMetError if the "skipped" 
Index: ports/classes/net/xp_framework/unittest/tests/SuiteTest.class.php
===================================================================
--- ports/classes/net/xp_framework/unittest/tests/SuiteTest.class.php	(revision 11673)
+++ ports/classes/net/xp_framework/unittest/tests/SuiteTest.class.php	(working copy)
@@ -7,7 +7,8 @@
   uses(
