update core to 7.36
This commit is contained in:
@@ -484,14 +484,6 @@ class FileValidatorTest extends DrupalWebTestCase {
|
||||
$original_user = $user;
|
||||
drupal_save_session(FALSE);
|
||||
|
||||
// Run these test as uid = 1.
|
||||
$user = user_load(1);
|
||||
|
||||
$file = new stdClass();
|
||||
$file->filesize = 999999;
|
||||
$errors = file_validate_size($file, 1, 1);
|
||||
$this->assertEqual(count($errors), 0, 'No size limits enforced on uid=1.', 'File');
|
||||
|
||||
// Run these tests as a regular user.
|
||||
$user = $this->drupalCreateUser();
|
||||
|
||||
@@ -2564,6 +2556,7 @@ class FileNameMungingTest extends FileTestCase {
|
||||
parent::setUp();
|
||||
$this->bad_extension = 'php';
|
||||
$this->name = $this->randomName() . '.' . $this->bad_extension . '.txt';
|
||||
$this->name_with_uc_ext = $this->randomName() . '.' . strtoupper($this->bad_extension) . '.txt';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2601,9 +2594,13 @@ class FileNameMungingTest extends FileTestCase {
|
||||
* White listed extensions are ignored by file_munge_filename().
|
||||
*/
|
||||
function testMungeIgnoreWhitelisted() {
|
||||
// Declare our extension as whitelisted.
|
||||
$munged_name = file_munge_filename($this->name, $this->bad_extension);
|
||||
$this->assertIdentical($munged_name, $this->name, format_string('The new filename (%munged) matches the original (%original) once the extension has been whitelisted.', array('%munged' => $munged_name, '%original' => $this->name)));
|
||||
// Declare our extension as whitelisted. The declared extensions should
|
||||
// be case insensitive so test using one with a different case.
|
||||
$munged_name = file_munge_filename($this->name_with_uc_ext, $this->bad_extension);
|
||||
$this->assertIdentical($munged_name, $this->name_with_uc_ext, format_string('The new filename (%munged) matches the original (%original) once the extension has been whitelisted.', array('%munged' => $munged_name, '%original' => $this->name_with_uc_ext)));
|
||||
// The allowed extensions should also be normalized.
|
||||
$munged_name = file_munge_filename($this->name, strtoupper($this->bad_extension));
|
||||
$this->assertIdentical($munged_name, $this->name, format_string('The new filename (%munged) matches the original (%original) also when the whitelisted extension is in uppercase.', array('%munged' => $munged_name, '%original' => $this->name)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user