mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 16:40:07 +01:00
MDL-76597 mod_quiz: Add a default heading name for Behat tests
This commit is contained in:
parent
6a7668e350
commit
934d8a2866
@ -676,6 +676,10 @@ class behat_mod_quiz extends behat_question_base {
|
||||
* @param string $sectionheading the new heading to set.
|
||||
*/
|
||||
public function i_set_the_section_heading_for($sectionname, $sectionheading) {
|
||||
// Empty section headings will have a default names of "Untitled heading".
|
||||
if (empty($sectionname)) {
|
||||
$sectionname = get_string('sectionnoname', 'quiz');
|
||||
}
|
||||
$this->execute('behat_general::click_link', $this->escape("Edit heading '{$sectionname}'"));
|
||||
|
||||
$this->execute('behat_general::assert_page_contains_text', $this->escape(get_string('edittitleinstructions')));
|
||||
|
Loading…
x
Reference in New Issue
Block a user