mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-43738 behat: Refactoring the field type guesser
The previous behaviour delegates the responsability of overwriting the 3 public methods to the child classes, now the field type or moodleform field is guessed earlier in the execution flow. Other changes introduced here: - Fix wrong moodleform detection when there is a form in the page but the field we are dealing with is not inside it. - Updating the last week feature files to these new step definitions. - Some coding style changes.
This commit is contained in:
parent
decf1e14c8
commit
8aff0eec9d
13 changed files with 223 additions and 93 deletions
|
@ -89,9 +89,6 @@ class behat_form_radio extends behat_form_checkbox {
|
|||
* @return bool
|
||||
*/
|
||||
public function matches($expectedvalue = false) {
|
||||
if (trim($expectedvalue) != trim($this->get_value())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return $this->text_matches($expectedvalue);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue