diff --git a/core/modules/simpletest/tests/file.test b/core/modules/simpletest/tests/file.test index a226b2e..aea3c79 100644 --- a/core/modules/simpletest/tests/file.test +++ b/core/modules/simpletest/tests/file.test @@ -2028,6 +2028,19 @@ class FileSaveTest extends FileHookTestCase { $this->assertNotNull($loaded_file, t("Record still exists in the database."), 'File'); $this->assertEqual($loaded_file->status, $saved_file->status, t("Status was saved correctly.")); $this->assertEqual($loaded_file->langcode, 'en', t("Langcode was saved correctly.")); + + // Try to insert a second file with the same name apart from case insensitivity + // to ensure the 'uri' index allows for filenames with different cases. + $file = (object) array( + 'uid' => 1, + 'filename' => 'DRUPLICON.txt', + 'uri' => 'public://DRUPLICON.txt', + 'filemime' => 'text/plain', + 'timestamp' => 1, + 'status' => FILE_STATUS_PERMANENT, + ); + file_put_contents($file->uri, 'hello world'); + file_save($file); } } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index a0e4f25..ceeea50 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -830,6 +830,7 @@ function system_schema() { 'length' => 255, 'not null' => TRUE, 'default' => '', + 'binary' => TRUE, ), 'uri' => array( 'description' => 'The URI to access the file (either local or remote).',