mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-70964 lang: Use the fixed strings in tests
This commit is contained in:
parent
422e70e308
commit
0c9eaeff59
6 changed files with 12 additions and 12 deletions
|
@ -324,7 +324,7 @@ class core_files_file_storage_testcase extends advanced_testcase {
|
||||||
|
|
||||||
// Try break it.
|
// Try break it.
|
||||||
$this->expectException('file_exception');
|
$this->expectException('file_exception');
|
||||||
$this->expectExceptionMessage('Can not create file "1/core/unittest/0/test/newtest.txt" (file exists, cannot rename)');
|
$this->expectExceptionMessage('Cannot create file 1/core/unittest/0/test/newtest.txt (file exists, cannot rename)');
|
||||||
// This shall throw exception.
|
// This shall throw exception.
|
||||||
$originalfile->rename($newpath, $newname);
|
$originalfile->rename($newpath, $newname);
|
||||||
}
|
}
|
||||||
|
@ -1478,7 +1478,7 @@ class core_files_file_storage_testcase extends advanced_testcase {
|
||||||
|
|
||||||
// Creating a file validating unique constraint.
|
// Creating a file validating unique constraint.
|
||||||
$this->expectException(stored_file_creation_exception::class);
|
$this->expectException(stored_file_creation_exception::class);
|
||||||
$this->expectExceptionMessage('Can not create file "1/core/phpunit/0/testfile.txt"');
|
$this->expectExceptionMessage('Cannot create file 1/core/phpunit/0/testfile.txt');
|
||||||
$fs->create_file_from_storedfile($filerecord, $file1->get_id());
|
$fs->create_file_from_storedfile($filerecord, $file1->get_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1835,7 +1835,7 @@ class core_files_file_storage_testcase extends advanced_testcase {
|
||||||
|
|
||||||
// Creating a file validating unique constraint.
|
// Creating a file validating unique constraint.
|
||||||
$this->expectException(stored_file_creation_exception::class);
|
$this->expectException(stored_file_creation_exception::class);
|
||||||
$this->expectExceptionMessage('Can not create file "1/core/phpunit/0/testfile.txt"');
|
$this->expectExceptionMessage('Cannot create file 1/core/phpunit/0/testfile.txt');
|
||||||
$file2 = $fs->create_file_from_pathname($filerecord, $path);
|
$file2 = $fs->create_file_from_pathname($filerecord, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase {
|
||||||
// This should generate an exception.
|
// This should generate an exception.
|
||||||
$this->expectException('file_exception');
|
$this->expectException('file_exception');
|
||||||
$this->expectExceptionMessageMatches(
|
$this->expectExceptionMessageMatches(
|
||||||
'/Can not create local file pool directories, please verify permissions in dataroot./');
|
'/Cannot create local file pool directories. Please verify permissions in dataroot./');
|
||||||
|
|
||||||
new file_system_filedir();
|
new file_system_filedir();
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase {
|
||||||
// This should generate an exception.
|
// This should generate an exception.
|
||||||
$this->expectException('file_exception');
|
$this->expectException('file_exception');
|
||||||
$this->expectExceptionMessageMatches(
|
$this->expectExceptionMessageMatches(
|
||||||
'/Can not create local file pool directories, please verify permissions in dataroot./');
|
'/Cannot create local file pool directories. Please verify permissions in dataroot./');
|
||||||
|
|
||||||
new file_system_filedir();
|
new file_system_filedir();
|
||||||
}
|
}
|
||||||
|
@ -835,7 +835,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase {
|
||||||
|
|
||||||
$this->expectException('file_exception');
|
$this->expectException('file_exception');
|
||||||
$this->expectExceptionMessageMatches(
|
$this->expectExceptionMessageMatches(
|
||||||
"/Can not create local file pool directories, please verify permissions in dataroot./");
|
"/Cannot create local file pool directories. Please verify permissions in dataroot./");
|
||||||
|
|
||||||
// Attempt to add the file to the file pool.
|
// Attempt to add the file to the file pool.
|
||||||
$fs = new file_system_filedir();
|
$fs = new file_system_filedir();
|
||||||
|
@ -893,7 +893,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase {
|
||||||
|
|
||||||
$this->expectException('file_exception');
|
$this->expectException('file_exception');
|
||||||
$this->expectExceptionMessageMatches(
|
$this->expectExceptionMessageMatches(
|
||||||
"/Can not create local file pool directories, please verify permissions in dataroot./");
|
"/Cannot create local file pool directories. Please verify permissions in dataroot./");
|
||||||
|
|
||||||
// Attempt to add the file to the file pool.
|
// Attempt to add the file to the file pool.
|
||||||
$fs = new file_system_filedir();
|
$fs = new file_system_filedir();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue