      }
      
      /**
-@@ -279,15 +285,49 @@
+@@ -279,15 +287,45 @@
       *
       * @param   unittest.TestCase test
       * @return  unittest.TestResult

       $listeners = array();
 
     /**
@@ -53,6 +54,8 @@
       if (!$test->getClass()->getMethod($test->name)) {
         throw new MethodNotImplementedException('Test method '.$test->name.'() does not exist');
       }
+      $s= sizeof($this->tests);
+      $this->order[$test->getClassName().$s]= $s;
       $this->tests[]= $test;
       return $test;
     }
@@ -73,15 +76,17 @@
 
       $ignored= array();
       $numBefore= $this->numTests();
+      $className= $class->getName();
+      $i= 0;
       foreach ($class->getMethods() as $m) {
         if (!$m->hasAnnotation('test')) continue;
         if ($m->hasAnnotation('ignore')) $ignored[]= $m;
 
-        // Add test method
-        $this->addTest(call_user_func_array(array($class, 'newInstance'), array_merge(
+        $this->order[$className.$i++]= sizeof($this->tests);
+        $this->tests[]= call_user_func_array(array($class, 'newInstance'), array_merge(
           (array)$m->getName(TRUE),
           $arguments

       }
 
       if ($numBefore === $this->numTests()) {
+        unset($this->order[$className]);
         throw new NoSuchElementException('No tests found in '.$class->getName());
       }
 
@@ -106,6 +113,7 @@
      */
     public function clearTests() {
       $this->tests= array();
