updated core to 7.65
This commit is contained in:
17
modules/simpletest/tests/file.test
Executable file → Normal file
17
modules/simpletest/tests/file.test
Executable file → Normal file
@@ -957,6 +957,15 @@ class FileDirectoryTest extends FileTestCase {
|
||||
$path = file_create_filename($basename, $directory);
|
||||
$this->assertEqual($path, $expected, format_string('Creating a new filepath from %original equals %new.', array('%new' => $path, '%original' => $original)), 'File');
|
||||
|
||||
try {
|
||||
$filename = "a\xFFtest\x80€.txt";
|
||||
file_create_filename($filename, $directory);
|
||||
$this->fail('Expected exception not thrown');
|
||||
}
|
||||
catch (RuntimeException $e) {
|
||||
$this->assertEqual("Invalid filename '$filename'", $e->getMessage());
|
||||
}
|
||||
|
||||
// @TODO: Finally we copy a file into a directory several times, to ensure a properly iterating filename suffix.
|
||||
}
|
||||
|
||||
@@ -989,6 +998,14 @@ class FileDirectoryTest extends FileTestCase {
|
||||
$this->assertNotEqual($path, $destination, 'A new filepath destination is created when filepath destination already exists with FILE_EXISTS_RENAME.', 'File');
|
||||
$path = file_destination($destination, FILE_EXISTS_ERROR);
|
||||
$this->assertEqual($path, FALSE, 'An error is returned when filepath destination already exists with FILE_EXISTS_ERROR.', 'File');
|
||||
|
||||
try {
|
||||
file_destination("core/misc/a\xFFtest\x80€.txt", FILE_EXISTS_REPLACE);
|
||||
$this->fail('Expected exception not thrown');
|
||||
}
|
||||
catch (RuntimeException $e) {
|
||||
$this->assertEqual("Invalid filename 'a\xFFtest\x80€.txt'", $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user