Backup and restore actions to help behat feature files writting.
More...
|
| fill_backup_restore_form ($options) |
| Tries to fill the current page form elements with the provided options.
|
|
| get_step_options ($options, $step) |
| Get the options specific to this step of the backup/restore process.
|
|
| process_restore ($options) |
| Executes the common steps of all restore processes.
|
|
| select_backup ($backupfilename) |
| Selects the backup to restore.
|
|
Backup and restore actions to help behat feature files writting.
- Copyright
- 2013 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later Backup-related steps definitions.
- Copyright
- 2013 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ fill_backup_restore_form()
behat_backup::fill_backup_restore_form |
( |
| $options | ) |
|
|
protected |
Tries to fill the current page form elements with the provided options.
This step is slow as it spins over each provided option, we are not expected to have lots of provided options, anyways, is better to be conservative and wait for the elements to appear rather than to have false failures.
- Parameters
-
TableNode | $options | The backup and restore options or false if no options provided |
- Return values
-
◆ get_step_options()
behat_backup::get_step_options |
( |
| $options, |
|
|
| $step ) |
|
protected |
Get the options specific to this step of the backup/restore process.
- Parameters
-
TableNode | $options | The options table to filter |
string | $step | The name of the step |
- Return values
-
TableNode | The filtered options table |
- 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.
◆ i_backup_course_using_this_options()
behat_backup::i_backup_course_using_this_options |
( |
| $backupcourse, |
|
|
| $options = false ) |
Backups the specified course using the provided options.
If you are interested in restoring this backup would be useful to provide a 'Filename' option.
@Given /^I backup "(?P<course_fullname_string>(?:[^"]|::")*)" course using this options:$/
- Parameters
-
string | $backupcourse | |
TableNode | $options | Backup options or false if no options provided |
◆ i_import_course_into_course()
behat_backup::i_import_course_into_course |
( |
| $fromcourse, |
|
|
| $tocourse, |
|
|
| $options = false ) |
Imports the specified origin course into the other course using the provided options.
Keeping it separatelly from backup & restore, it the number of steps and duplicate code becomes bigger a common method should be generalized.
@Given /^I import "(?P<from_course_fullname_string>(?:[^"]|::")*)" course into "(?P<to_course_fullname_string>(?:[^"]|")*)" course using this options:$/
- Parameters
-
string | $fromcourse | |
string | $tocourse | |
TableNode | $options | |
◆ i_merge_backup_into_current_course_deleting_its_contents()
behat_backup::i_merge_backup_into_current_course_deleting_its_contents |
( |
| $backupfilename, |
|
|
| $options = false ) |
Merges the backup into the current course after deleting this contents, using the provided restore options.
You should be in the 'Restore' page where the backup is.
@Given /^I merge "(?P<backup_filename_string>(?:[^"]|::")*)" backup into the current course after deleting it's contents using this options:$/
- Parameters
-
string | $backupfilename | |
TableNode | $options | Restore forms options or false if no options provided |
◆ i_merge_backup_into_the_current_course()
behat_backup::i_merge_backup_into_the_current_course |
( |
| $backupfilename, |
|
|
| $options = false ) |
Merges the backup into the current course using the provided restore options.
You should be in the 'Restore' page where the backup is.
@Given /^I merge "(?P<backup_filename_string>(?:[^"]|::")*)" backup into the current course using this options:$/
- Parameters
-
string | $backupfilename | |
TableNode | $options | Restore forms options or false if no options provided |
◆ i_perform_a_quick_backup_of_course()
behat_backup::i_perform_a_quick_backup_of_course |
( |
| $backupcourse | ) |
|
Performs a quick (one click) backup of a course.
Please note that because you can't set settings with this there is no way to know what the filename that was produced was. It contains a timestamp making it hard to find.
@Given /^I perform a quick backup of course "(?P<course_fullname_string>(?:[^"]|::")*)"$/
- Parameters
-
◆ i_restore_backup_into_a_new_course_using_this_options()
behat_backup::i_restore_backup_into_a_new_course_using_this_options |
( |
| $backupfilename, |
|
|
| $options = false ) |
Restores the specified backup into a new course using the provided options.
You should be in the 'Restore' page where the backup is.
@Given /^I restore "(?P<backup_filename_string>(?:[^"]|::")*)" backup into a new course using this options:$/
- Parameters
-
string | $backupfilename | |
TableNode | $options | Restore forms options or false if no options provided |
◆ i_restore_backup_into_course_using_this_options()
behat_backup::i_restore_backup_into_course_using_this_options |
( |
| $backupfilename, |
|
|
| $existingcourse, |
|
|
| $options = false ) |
Restores the backup into the specified course and the provided options.
You should be in the 'Restore' page where the backup is.
@Given /^I restore "(?P<backup_filename_string>(?:[^"]|::")*)" backup into "(?P<existing_course_fullname_string>(?:[^"]|")*)" course using this options:$/
- Parameters
-
string | $backupfilename | |
string | $existingcourse | |
TableNode | $options | Restore forms options or false if no options provided |
◆ process_restore()
behat_backup::process_restore |
( |
| $options | ) |
|
|
protected |
Executes the common steps of all restore processes.
- Parameters
-
TableNode | $options | The backup and restore options or false if no options provided |
- Return values
-
◆ select_backup()
behat_backup::select_backup |
( |
| $backupfilename | ) |
|
|
protected |
Selects the backup to restore.
- Exceptions
-
- Parameters
-
- Return values
-
◆ 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: