Merge branch 'MDL-43874' of git://github.com/timhunt/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2014-01-27 23:52:07 +01:00
commit 835ef9d84c
4 changed files with 74 additions and 2 deletions

View file

@ -854,13 +854,22 @@ abstract class qbehaviour_walkthrough_test_base extends question_testcase {
'Looking for a hidden input with attributes ' . html_writer::attributes($attributes) . ' in ' . $this->currentoutput);
}
protected function check_output_contains_lang_string($identifier, $component = '', $a = null) {
protected function check_output_contains($string) {
$this->render();
$string = get_string($identifier, $component, $a);
$this->assertContains($string, $this->currentoutput,
'Expected string ' . $string . ' not found in ' . $this->currentoutput);
}
protected function check_output_does_not_contain($string) {
$this->render();
$this->assertNotContains($string, $this->currentoutput,
'String ' . $string . ' unexpectedly found in ' . $this->currentoutput);
}
protected function check_output_contains_lang_string($identifier, $component = '', $a = null) {
$this->check_output_contains(get_string($identifier, $component, $a));
}
protected function get_tag_matcher($tag, $attributes) {
return array(
'tag' => $tag,