diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-02-22 17:55:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-02-22 17:55:30 +0000 |
commit | 5d658d08481c22b5ef577b39a29cd647438b211f (patch) | |
tree | 74fca69f981d985604b126943aed71bb79d1bbcb /modules/upload | |
parent | b3e36d655c831c63c26a710eb3c8bd82ca3b6fc5 (diff) | |
download | brdo-5d658d08481c22b5ef577b39a29cd647438b211f.tar.gz brdo-5d658d08481c22b5ef577b39a29cd647438b211f.tar.bz2 |
- Patch #380064 by c960657: make file_scan_directory() use save property names as file_load().
Diffstat (limited to 'modules/upload')
-rw-r--r-- | modules/upload/upload.test | 10 |
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')); |