From a0094171894283ce4e6d9169fdc2375b0acaa6ba Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 2 Jul 2008 19:34:13 +0000 Subject: - Patch #277586 by chx: call setUp for each test method. --- modules/simpletest/drupal_web_test_case.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/simpletest/drupal_web_test_case.php') 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(); } -- cgit v1.2.3