mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-65537 lang: Use fixed strings in tests, too
This commit is contained in:
parent
f715376907
commit
14f7489675
@ -182,7 +182,7 @@ class format_topics_testcase extends advanced_testcase {
|
||||
$tmpl = component_callback('format_weeks', 'inplace_editable', array('sectionname', $section->id, 'New name'));
|
||||
$this->fail('Exception expected');
|
||||
} catch (moodle_exception $e) {
|
||||
$this->assertEquals(1, preg_match('/^Can not find data record in database/', $e->getMessage()));
|
||||
$this->assertEquals(1, preg_match('/^Can\'t find data record in database/', $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ class format_weeks_testcase extends advanced_testcase {
|
||||
$tmpl = component_callback('format_topics', 'inplace_editable', array('sectionname', $section->id, 'New name'));
|
||||
$this->fail('Exception expected');
|
||||
} catch (moodle_exception $e) {
|
||||
$this->assertEquals(1, preg_match('/^Can not find data record in database/', $e->getMessage()));
|
||||
$this->assertEquals(1, preg_match('/^Can\'t find data record in database/', $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ class core_customfield_data_controller_testcase extends advanced_testcase {
|
||||
data_controller::create($datarecord->id + 1);
|
||||
$this->fail('Expected exception');
|
||||
} catch (dml_missing_record_exception $e) {
|
||||
$this->assertStringMatchesFormat('Can not find data record in database table customfield_data%a', $e->getMessage());
|
||||
$this->assertStringMatchesFormat('Can\'t find data record in database table customfield_data%a', $e->getMessage());
|
||||
$this->assertEquals(dml_missing_record_exception::class, get_class($e));
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,6 @@ Feature: Students can reply to a discussion in page.
|
||||
| post | Discussion contents 1, third message |
|
||||
| privatereply | 1 |
|
||||
Then I should see "Discussion contents 1, third message"
|
||||
Then I should see "This post was made privately and is not visible to all users."
|
||||
Then I should see "This is a private reply. It is not visible to other participants."
|
||||
When I reload the page
|
||||
Then I should see "Discussion contents 1, third message"
|
@ -237,4 +237,4 @@ Feature: Edit quiz page - remove multiple questions
|
||||
And I click on "selectquestion-3" "checkbox"
|
||||
And I click on "Delete selected" "button"
|
||||
|
||||
Then I should see "Can not remove questions"
|
||||
Then I should see "Cannot remove questions"
|
||||
|
Loading…
x
Reference in New Issue
Block a user