summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-09-11 21:14:32 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-09-11 21:14:32 +0000
commit4237d014e9599fb54243c87f23a003df012b29a7 (patch)
treef7d7f6f69754db132743d1214eab81228d01bd90 /modules/simpletest
parentd5a1c652973af06d64305ae1672bd215b2cdfb58 (diff)
downloadbrdo-4237d014e9599fb54243c87f23a003df012b29a7.tar.gz
brdo-4237d014e9599fb54243c87f23a003df012b29a7.tar.bz2
#874326 by rfay, pwolanin, chx: Fixed Invalid scheme fails to halt processing of a stream request.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/drupal_web_test_case.php2
-rw-r--r--modules/simpletest/tests/file.test4
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 323825ac2..36568a8d4 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -939,7 +939,7 @@ class DrupalWebTestCase extends DrupalTestCase {
$files = array();
// Make sure type is valid.
if (in_array($type, array('binary', 'html', 'image', 'javascript', 'php', 'sql', 'text'))) {
- $files = file_scan_directory(variable_get('file_public_path', conf_path() . '/files'), '/' . $type . '\-.*/');
+ $files = file_scan_directory('public://', '/' . $type . '\-.*/');
// If size is set then remove any files that are not of that size.
if ($size !== NULL) {
diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test
index 7d3c7bccc..f8c72ac63 100644
--- a/modules/simpletest/tests/file.test
+++ b/modules/simpletest/tests/file.test
@@ -575,7 +575,9 @@ class FileSaveUploadTest extends FileHookTestCase {
$account = $this->drupalCreateUser(array('access content'));
$this->drupalLogin($account);
- $this->image = current($this->drupalGetTestFiles('image'));
+ $image_files = $this->drupalGetTestFiles('image');
+ $this->image = current($image_files);
+
list(, $this->image_extension) = explode('.', $this->image->filename);
$this->assertTrue(is_file($this->image->uri), t("The image file we're going to upload exists."));