diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 3617ccc975e..9423a39d6d6 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -156,7 +156,7 @@ Feature: Set up contextual data for tests And I log in as "user5" And I should see "You are logged in as" 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 Given the following "courses" exist: diff --git a/course/tests/behat/course_browsing.feature b/course/tests/behat/course_browsing.feature index 8fefc5b1265..4993d076e20 100644 --- a/course/tests/behat/course_browsing.feature +++ b/course/tests/behat/course_browsing.feature @@ -79,7 +79,7 @@ Feature: Restricting access to course lists And I should not see "Humanities" And I should not see "Other category" 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 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 not contain "Other category" 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 diff --git a/enrol/self/tests/behat/self_enrolment.feature b/enrol/self/tests/behat/self_enrolment.feature index 35ddfce7275..91551f027a2 100644 --- a/enrol/self/tests/behat/self_enrolment.feature +++ b/enrol/self/tests/behat/self_enrolment.feature @@ -62,7 +62,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe Scenario: Self-enrolment disabled Given I log in as "student1" 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 Given I log in as "teacher1" diff --git a/lib/filestorage/file_exceptions.php b/lib/filestorage/file_exceptions.php index 61304f80a6d..7639810933f 100644 --- a/lib/filestorage/file_exceptions.php +++ b/lib/filestorage/file_exceptions.php @@ -46,7 +46,7 @@ class file_exception extends moodle_exception { } /** - * Can not create file exception. + * Cannot create file exception. * * @package core_files * @category files diff --git a/lib/filestorage/tests/file_storage_test.php b/lib/filestorage/tests/file_storage_test.php index 62c19f30e13..3134458af96 100644 --- a/lib/filestorage/tests/file_storage_test.php +++ b/lib/filestorage/tests/file_storage_test.php @@ -324,7 +324,7 @@ class core_files_file_storage_testcase extends advanced_testcase { // Try break it. $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. $originalfile->rename($newpath, $newname); } @@ -1478,7 +1478,7 @@ class core_files_file_storage_testcase extends advanced_testcase { // Creating a file validating unique constraint. $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()); } @@ -1835,7 +1835,7 @@ class core_files_file_storage_testcase extends advanced_testcase { // Creating a file validating unique constraint. $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); } diff --git a/lib/filestorage/tests/file_system_filedir_test.php b/lib/filestorage/tests/file_system_filedir_test.php index 3896770cc59..bc6c7846a9a 100644 --- a/lib/filestorage/tests/file_system_filedir_test.php +++ b/lib/filestorage/tests/file_system_filedir_test.php @@ -154,7 +154,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { // This should generate an exception. $this->expectException('file_exception'); $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(); } @@ -178,7 +178,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { // This should generate an exception. $this->expectException('file_exception'); $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(); } @@ -835,7 +835,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { $this->expectException('file_exception'); $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. $fs = new file_system_filedir(); @@ -893,7 +893,7 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { $this->expectException('file_exception'); $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. $fs = new file_system_filedir();