diff options
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index e7a0c0746..453824fba 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -256,17 +256,17 @@ class DrupalWebTestCase { */ function run() { set_error_handler(array($this, 'errorHandler')); - $this->setUp(); $methods = array(); // Iterate through all the methods in this class. foreach (get_class_methods(get_class($this)) as $method) { // If the current method starts with "test", run it - it's a test. if (strtolower(substr($method, 0, 4)) == 'test') { + $this->setUp(); $this->$method(); + // Finish up. + $this->tearDown(); } } - // Finish up. - $this->tearDown(); restore_error_handler(); } |