MDL-72879 lang: Use fixed strings in tests, too

This commit is contained in:
David Mudrák
2021-10-27 07:37:03 +02:00
parent 07b7482063
commit 53bb0947b6
20 changed files with 29 additions and 29 deletions
@@ -43,7 +43,7 @@
Example context (json):
{
"name" : "tour_activity_completion",
"endtourlabel" : "Got it!",
"endtourlabel" : "Got it",
"steps": [
{
"stepid": 10,
@@ -37,7 +37,7 @@ Feature: Apply tour filters to a tour
And I log in as "student1"
And I am on "Course 1" course homepage
And I should see "Welcome to your course tour."
And I click on "Got it!" "button"
And I click on "Got it" "button"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
@@ -38,7 +38,7 @@ Feature: Steps can be navigated within a tour
And I follow "Dashboard" in the user menu
And I wait until the page is ready
And I should see "This is the calendar block"
Then I should see "Got it!"
Then I should see "Got it"
@javascript
Scenario: End tour button text for multiple step tours
@@ -20,13 +20,13 @@ Feature: Use the qbank plugin manager page for comment
Scenario: Enable/disable comment column from the base view
Given I log in as "admin"
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
And I should see "Question comment"
And I click on "Disable" "link" in the "Question comment" "table_row"
And I should see "Question comments"
And I click on "Disable" "link" in the "Question comments" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank > Questions" in current page administration
Then "#categoryquestions .header.commentcount" "css_element" should not be visible
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
And I click on "Enable" "link" in the "Question comment" "table_row"
And I click on "Enable" "link" in the "Question comments" "table_row"
And I am on the "Test quiz" "quiz activity" page
And I navigate to "Question bank > Questions" in current page administration
And "#categoryquestions .header.commentcount" "css_element" should be visible
@@ -103,7 +103,7 @@ class qbank_comment_comment_created_deleted_test extends advanced_testcase {
// Checking that the event contains the expected values.
$this->assertInstanceOf('\qbank_comment\event\comment_created', $event);
$this->assertEquals($this->context, $event->get_context());
$this->assertStringContainsString('\'qbank_comment\' for the question with id \''.$this->questiondata->id.'\'',
$this->assertStringContainsString('\'qbank_comment\' for the question with ID \''.$this->questiondata->id.'\'',
$event->get_description());
}
@@ -122,7 +122,7 @@ class qbank_comment_comment_created_deleted_test extends advanced_testcase {
// Checking that the event contains the expected values.
$this->assertInstanceOf('\qbank_comment\event\comment_deleted', $event);
$this->assertEquals($this->context, $event->get_context());
$this->assertStringContainsString('\'qbank_comment\' for the question with id \''.$this->questiondata->id.'\'',
$this->assertStringContainsString('\'qbank_comment\' for the question with ID \''.$this->questiondata->id.'\'',
$event->get_description());
}
}
+1 -1
View File
@@ -92,7 +92,7 @@ class add_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
add::execute($report->get('id'), 'user:fullname');
}
}
+1 -1
View File
@@ -98,7 +98,7 @@ class delete_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
delete::execute($report->get('id'), $column->get('id'));
}
}
+1 -1
View File
@@ -98,7 +98,7 @@ class reorder_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
reorder::execute($report->get('id'), $column->get('id'), 1);
}
}
+1 -1
View File
@@ -108,7 +108,7 @@ class reorder_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
reorder::execute($report->get('id'), $column->get('id'), 2);
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ class toggle_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
toggle::execute($report->get('id'), $column->get('id'), true, SORT_DESC);
}
}
+1 -1
View File
@@ -82,7 +82,7 @@ class add_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
add::execute($report->get('id'), 'user:fullname');
}
}
+1 -1
View File
@@ -91,7 +91,7 @@ class delete_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
delete::execute($report->get('id'), $condition->get('id'));
}
}
+1 -1
View File
@@ -99,7 +99,7 @@ class reorder_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
reorder::execute($report->get('id'), $condition->get('id'), 1);
}
}
+1 -1
View File
@@ -79,7 +79,7 @@ class reset_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
reset::execute($report->get('id'));
}
}
+1 -1
View File
@@ -87,7 +87,7 @@ class add_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
add::execute($report->get('id'), 'user:fullname');
}
}
+1 -1
View File
@@ -92,7 +92,7 @@ class delete_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
delete::execute($report->get('id'), $filter->get('id'));
}
}
+1 -1
View File
@@ -102,7 +102,7 @@ class reorder_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
reorder::execute($report->get('id'), $filter->get('id'), 1);
}
}
+1 -1
View File
@@ -81,7 +81,7 @@ class delete_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
delete::execute($report->get('id'));
}
}
+2 -2
View File
@@ -125,7 +125,7 @@ class get_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
get::execute($report->get('id'), true);
}
@@ -148,7 +148,7 @@ class get_test extends externallib_advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not view this report');
$this->expectExceptionMessage('You cannot view this report');
get::execute($report->get('id'), false);
}
}
+6 -6
View File
@@ -58,7 +58,7 @@ class permission_test extends advanced_testcase {
unassign_capability('moodle/reportbuilder:view', $userrole, context_system::instance());
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not view this report');
$this->expectExceptionMessage('You cannot view this report');
permission::require_can_view_reports_list();
}
@@ -92,7 +92,7 @@ class permission_test extends advanced_testcase {
unassign_capability('moodle/reportbuilder:view', $userrole, context_system::instance());
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not view this report');
$this->expectExceptionMessage('You cannot view this report');
permission::require_can_view_report($report);
}
@@ -109,7 +109,7 @@ class permission_test extends advanced_testcase {
$systemreport = system_report_factory::create(system_report_available::class, context_system::instance());
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
permission::require_can_edit_report($systemreport->get_report_persistent());
}
@@ -139,7 +139,7 @@ class permission_test extends advanced_testcase {
}
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
permission::require_can_edit_report($reportadmin);
}
@@ -169,7 +169,7 @@ class permission_test extends advanced_testcase {
$this->setUser($user);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not edit this report');
$this->expectExceptionMessage('You cannot edit this report');
permission::require_can_edit_report($reportadmin);
}
@@ -212,7 +212,7 @@ class permission_test extends advanced_testcase {
$this->setUser($user3);
$this->expectException(report_access_exception::class);
$this->expectExceptionMessage('You can not create a new report');
$this->expectExceptionMessage('You cannot create a new report');
permission::require_can_create_report((int)$user3->id);
}
}