summaryrefslogtreecommitdiff
path: root/modules/upload
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upload')
-rw-r--r--modules/upload/upload.test10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/upload/upload.test b/modules/upload/upload.test
index bd4bfbdc9..b95ff78f8 100644
--- a/modules/upload/upload.test
+++ b/modules/upload/upload.test
@@ -39,7 +39,7 @@ class UploadTestCase extends DrupalWebTestCase {
// Create a node and attempt to attach files.
$node = $this->drupalCreateNode();
$text_files = $this->drupalGetTestFiles('text');
- $files = array(current($text_files)->filename, next($text_files)->filename);
+ $files = array(current($text_files)->filepath, next($text_files)->filepath);
$this->uploadFile($node, $files[0]);
$this->uploadFile($node, $files[1]);
@@ -108,17 +108,17 @@ class UploadTestCase extends DrupalWebTestCase {
$text_file = current($this->drupalGetTestFiles('text'));
// Select a file that's less than the 1MB upload limit so we only test one
// limit at a time.
- $this->uploadFile($node, $text_file->filename, FALSE);
+ $this->uploadFile($node, $text_file->filepath, FALSE);
// Test the error message in two steps in case there are additional errors
// that change the error message's format.
- $this->assertRaw(t('The specified file %name could not be uploaded.', array('%name' => $text_file->basename)), t('File %filename was not allowed to be uploaded', array('%filename' => $text_file->filename)));
+ $this->assertRaw(t('The specified file %name could not be uploaded.', array('%name' => $text_file->filename)), t('File %filepath was not allowed to be uploaded', array('%filepath' => $text_file->filepath)));
$this->assertRaw(t('Only files with the following extensions are allowed: %files-allowed.', array('%files-allowed' => $settings['upload_extensions'])), t('File extension cited as reason for failure'));
// Attempt to upload .html file when .html is only extension allowed.
$html_files = array_values($this->drupalGetTestFiles('html'));
// Use the HTML file with the .html extension, $html_files[0] has a .txt
// extension.
- $html_file = $html_files[1]->filename;
+ $html_file = $html_files[1]->filepath;
$this->uploadFile($node, $html_file);
$this->assertNoRaw(t('The specified file %name could not be uploaded.', array('%name' => basename($html_file))), t('File '. $html_file . ' was allowed to be uploaded'));
}
@@ -128,7 +128,7 @@ class UploadTestCase extends DrupalWebTestCase {
*/
function testLimit() {
$files = $this->drupalGetTestFiles('text', 1310720); // 1 MB.
- $file = current($files)->filename;
+ $file = current($files)->filepath;
$admin_user = $this->drupalCreateUser(array('administer site configuration'));
$web_user = $this->drupalCreateUser(array('access content', 'edit any page content', 'upload files', 'view uploaded files'));