mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-75456 behat: final deprecation of get_node_type() and get_field()
This commit is contained in:
parent
896e126a66
commit
7abd77f565
@ -336,47 +336,18 @@ class behat_field_manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an instance of the form field.
|
||||
*
|
||||
* Not all the fields are part of a moodle form, in this
|
||||
* cases it fallsback to the generic form field. Also note
|
||||
* that this generic field type is using a generic setValue()
|
||||
* method from the Behat API, which is not always good to set
|
||||
* the value of form elements.
|
||||
*
|
||||
* @deprecated since Moodle 2.6 MDL-39634 - please do not use this function any more.
|
||||
* @todo MDL-XXXXX This will be deleted in Moodle 2.8
|
||||
* @see behat_field_manager::get_form_field()
|
||||
* @param NodeElement $fieldnode
|
||||
* @param string $locator
|
||||
* @param Session $session The behat browser session
|
||||
* @return behat_form_field
|
||||
*/
|
||||
public static function get_field(NodeElement $fieldnode, $locator, Session $session) {
|
||||
debugging('Function behat_field_manager::get_field() is deprecated, ' .
|
||||
'please use function behat_field_manager::get_form_field() instead', DEBUG_DEVELOPER);
|
||||
|
||||
return self::get_form_field($fieldnode, $session);
|
||||
public static function get_field() {
|
||||
throw new coding_exception('behat_field_manager::get_field() can not be used any more, ' .
|
||||
'function behat_field_manager::get_form_field() instead');
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursive method to find the field type.
|
||||
*
|
||||
* Depending on the field the felement class node is in a level or in another. We
|
||||
* look recursively for a parent node with a 'felement' class to find the field type.
|
||||
*
|
||||
* @deprecated since Moodle 2.6 MDL-39634 - please do not use this function any more.
|
||||
* @todo MDL-XXXXX This will be deleted in Moodle 2.8
|
||||
* @see behat_field_manager::get_field_node_type()
|
||||
* @param NodeElement $fieldnode The current node.
|
||||
* @param string $locator
|
||||
* @param Session $session The behat browser session
|
||||
* @return mixed A NodeElement if we continue looking for the element type and String or false when we are done.
|
||||
*/
|
||||
protected static function get_node_type(NodeElement $fieldnode, $locator, Session $session) {
|
||||
debugging('Function behat_field_manager::get_node_type() is deprecated, ' .
|
||||
'please use function behat_field_manager::get_field_node_type() instead', DEBUG_DEVELOPER);
|
||||
|
||||
return self::get_field_node_type($fieldnode, $session);
|
||||
protected static function get_node_type() {
|
||||
throw new coding_exception('behat_field_manager::get_node_type() can not be used any more, ' .
|
||||
'function behat_field_manager::get_field_node_type() instead');
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,8 @@ This files describes API changes in core libraries and APIs,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
=== 4.1 ===
|
||||
|
||||
* Final deprecation of the following functions behat_field_manager::get_node_type() and behat_field_manager::get_field()
|
||||
please call behat_field_manager::get_field_node_type() and behat_field_manager::get_form_field().
|
||||
* Final deprecation and removal of the following class, please use \core\task\manager.
|
||||
- \tool_task\run_from_cli
|
||||
* Final deprecation and removal of the following CLI scripts:
|
||||
|
Loading…
x
Reference in New Issue
Block a user