diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-13 00:39:01 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-13 00:39:01 +0000 |
commit | 52c17c6d3ec99a872436ad09377401c25ff0bb55 (patch) | |
tree | 7305d46ec03a700f2eb4a2d9f5cf546b4944ac9f /modules/simpletest/drupal_web_test_case.php | |
parent | 6afc39c2e468798f3c15e1faee45e51f1440bb51 (diff) | |
download | brdo-52c17c6d3ec99a872436ad09377401c25ff0bb55.tar.gz brdo-52c17c6d3ec99a872436ad09377401c25ff0bb55.tar.bz2 |
#373502 by drewish and sun: Add function to delete unmanaged files recurisevely (with tests).
Diffstat (limited to 'modules/simpletest/drupal_web_test_case.php')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 9aad62dd9..cd8b16216 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -902,7 +902,7 @@ class DrupalWebTestCase { global $db_prefix, $user; if (preg_match('/simpletest\d+/', $db_prefix)) { // Delete temporary files directory and reset files directory path. - simpletest_clean_temporary_directory(file_directory_path()); + file_unmanaged_delete_recursive(file_directory_path()); variable_set('file_directory_path', $this->originalFileDirectory); // Remove all prefixed tables (all the tables in the schema). @@ -1999,7 +1999,7 @@ class DrupalWebTestCase { $match = is_array($code) ? in_array($curl_code, $code) : $curl_code == $code; return $this->assertTrue($match, $message ? $message : t('HTTP response expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), t('Browser')); } - + /** * TODO write documentation. * @param $type @@ -2017,13 +2017,13 @@ class DrupalWebTestCase { ); $field_definition += $settings; field_create_field($field_definition); - + $field = field_read_field($field_name); $this->assertTrue($field, t('Created field @field_name of type @type.', array('@field_name' => $field_name, '@type' => $type))); - + return $field; } - + /** * TODO write documentation. * @param $field_name @@ -2046,10 +2046,10 @@ class DrupalWebTestCase { ), ); field_create_instance($instance_definition); - + $instance = field_read_instance($field_name, $bundle); $this->assertTrue($instance, t('Created instance of field @field_name on bundle @bundle.', array('@field_name' => $field_name, '@bundle' => $bundle))); - + return $instance; } } |