MDL-70964 lang: Use the fixed strings in tests

This commit is contained in:
David Mudrák 2021-02-25 09:38:38 +01:00
parent 422e70e308
commit 0c9eaeff59
6 changed files with 12 additions and 12 deletions

View file

@ -156,7 +156,7 @@ Feature: Set up contextual data for tests
And I log in as "user5" And I log in as "user5"
And I should see "You are logged in as" And I should see "You are logged in as"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I should see "You can not enrol yourself in this course." And I should see "You cannot enrol yourself in this course."
Scenario: Add modules Scenario: Add modules
Given the following "courses" exist: Given the following "courses" exist:

View file

@ -79,7 +79,7 @@ Feature: Restricting access to course lists
And I should not see "Humanities" And I should not see "Humanities"
And I should not see "Other category" And I should not see "Other category"
And I follow "English Y2" And I follow "English Y2"
And I should see "You can not enrol yourself in this course." And I should see "You cannot enrol yourself in this course."
And I log out And I log out
Scenario: Browse courses as a user who has access to several but not all categories Scenario: Browse courses as a user who has access to several but not all categories
@ -102,5 +102,5 @@ Feature: Restricting access to course lists
And the "Course categories" select box should contain "English category" And the "Course categories" select box should contain "English category"
And the "Course categories" select box should not contain "Other category" And the "Course categories" select box should not contain "Other category"
And I follow "Biology Y1" And I follow "Biology Y1"
And I should see "You can not enrol yourself in this course." And I should see "You cannot enrol yourself in this course."
And I log out And I log out

View file

@ -62,7 +62,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Scenario: Self-enrolment disabled Scenario: Self-enrolment disabled
Given I log in as "student1" Given I log in as "student1"
When I am on "Course 1" course homepage When I am on "Course 1" course homepage
Then I should see "You can not enrol yourself in this course" Then I should see "You cannot enrol yourself in this course"
Scenario: Self-enrolment enabled requiring a group enrolment key Scenario: Self-enrolment enabled requiring a group enrolment key
Given I log in as "teacher1" Given I log in as "teacher1"

View file

@ -46,7 +46,7 @@ class file_exception extends moodle_exception {
} }
/** /**
* Can not create file exception. * Cannot create file exception.
* *
* @package core_files * @package core_files
* @category files * @category files

View file

@ -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);
} }

View file

@ -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();