summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-07-02 19:34:13 +0000
committerDries Buytaert <dries@buytaert.net>2008-07-02 19:34:13 +0000
commita0094171894283ce4e6d9169fdc2375b0acaa6ba (patch)
tree63ec359622c6373bca82f9057ceb5fb2fe2132de
parent929b2c599c4337464941c5bc7e5a8293e31dc0b1 (diff)
downloadbrdo-a0094171894283ce4e6d9169fdc2375b0acaa6ba.tar.gz
brdo-a0094171894283ce4e6d9169fdc2375b0acaa6ba.tar.bz2
- Patch #277586 by chx: call setUp for each test method.
-rw-r--r--modules/simpletest/drupal_web_test_case.php6
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();
}