Steps definitions that are now deprecated and will be removed in the next releases.
More...
|
| download_file_from_link_within_node (string $selectortype, string $link, string $nodeselectortype, string $nodeelement) |
| Given the text of a link, download the linked file and return the contents.
|
|
| following_in_the_should_download_between_and_bytes (string $link, string $selectortype, string $nodeelement, string $nodeselectortype, int $minexpectedsize, int $maxexpectedsize) |
| Downloads the file from a specific link on the page and checks the size is in a given range.
|
|
| getSession ($name=null) |
| Returns the Mink session.
|
|
|
| deprecated_message ($alternatives, bool $throwexception=false) |
| Throws an exception if $CFG->behat_usedeprecated is not allowed.
|
|
Steps definitions that are now deprecated and will be removed in the next releases.
- Copyright
- 2021 Pimenko suppo.nosp@m.rt@p.nosp@m.imenk.nosp@m.o.co.nosp@m.m<pimenko.com>
- Author
- Sylvain Revenu | Pimenko
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- Copyright
- 2021 Pimenko suppo.nosp@m.rt@p.nosp@m.imenk.nosp@m.o.co.nosp@m.m<pimenko.com>
- Author
- Sylvain Revenu | Pimenko
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- Todo
- MDL-78077 This will be deleted in Moodle 6.0.
◆ deprecated_message()
behat_deprecated_base::deprecated_message |
( |
| $alternatives, |
|
|
bool | $throwexception = false ) |
|
protectedinherited |
Throws an exception if $CFG->behat_usedeprecated is not allowed.
- Exceptions
-
- Parameters
-
string | array | $alternatives | Alternative/s to the requested step |
bool | $throwexception | If set to true we always throw exception, irrespective of behat_usedeprecated setting. |
- Return values
-
◆ download_file_from_link_within_node()
behat_admin_presets_deprecated::download_file_from_link_within_node |
( |
string | $selectortype, |
|
|
string | $link, |
|
|
string | $nodeselectortype, |
|
|
string | $nodeelement ) |
|
final |
Given the text of a link, download the linked file and return the contents.
This is a helper method used by {
- See also
- following_in_the_should_download_between_and_bytes()}
- Parameters
-
string | $selectortype | The type of what we look for |
string | $link | the text of the link. |
string | $nodeselectortype | The type of selector where we look in |
string | $nodeelement | Element we look in |
- Return values
-
string | the content of the downloaded file. |
◆ following_in_the_should_download_between_and_bytes()
behat_admin_presets_deprecated::following_in_the_should_download_between_and_bytes |
( |
string | $link, |
|
|
string | $selectortype, |
|
|
string | $nodeelement, |
|
|
string | $nodeselectortype, |
|
|
int | $minexpectedsize, |
|
|
int | $maxexpectedsize ) |
|
final |
Downloads the file from a specific link on the page and checks the size is in a given range.
Only works if the link has an href attribute. Javascript downloads are not supported. Currently, the href must be an absolute URL.
The range includes the endpoints. That is, a 10 byte file in considered to be between "5" and "10" bytes, and between "10" and "20" bytes.
- Deprecated
- since 5.0
@Then /^following "(?P<link_string>[^"]*)" "(?P<selector_string>[^"]*)" in the "(?P<element_container_string>(?:[^"]|::")*)" "(?P<text_selector_string>[^"]*)" should download between "(?P<min_bytes>::d+)" and "(?P<max_bytes>\d+)" bytes$/
- Parameters
-
string | $link | the text of the link. |
string | $selectortype | The type of what we look for |
string | $nodeelement | Element we look in |
string | $nodeselectortype | The type of selector where we look in |
int | $minexpectedsize | the minimum expected file size in bytes. |
int | $maxexpectedsize | the maximum expected file size in bytes. |
- Return values
-
- Exceptions
-
◆ getSession()
behat_session_interface::getSession |
( |
| $name = null | ) |
|
|
inherited |
Returns the Mink session.
- Parameters
-
string | null | $name | name of the session OR active session will be used |
- Return values
-
Implemented in behat_form_field.
◆ PAGE_READY_JS
const behat_session_interface::PAGE_READY_JS |
|
inherited |
Initial value:= "document.readyState === 'complete' && " .
"(typeof M !== 'object' || typeof M.util !== 'object' || " .
"typeof M.util.pending_js === 'undefined' || M.util.pending_js.length === 0)"
The JS code to check that the page is ready.
The document must be complete and either M.util.pending_js must be empty, or it must not be defined at all.
The documentation for this class was generated from the following file:
- admin/tool/admin_presets/tests/behat/behat_admin_presets_deprecated.php