[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Source view] [Print] [Project Stats]
Testing util classes
Copyright: | 2012 Petr Skoda {@link http://skodak.org} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 962 lines (33 kb) |
Included or required: | 2 times |
Referenced: | 0 times |
Includes or requires: | 1 file lib/testing/generator/lib.php |
get_originaldatafilesjson() X-Ref |
Return the name of the JSON file containing the init filenames. return: string |
get_dataroot() X-Ref |
Return the dataroot. It's useful when mocking the dataroot when unit testing this class itself. return: string the dataroot. |
set_dataroot($dataroot) X-Ref |
Set the dataroot. It's useful when mocking the dataroot when unit testing this class itself. param: string $dataroot the dataroot of the test framework. |
get_framework() X-Ref |
Returns the testing framework name return: string |
get_data_generator() X-Ref |
Get data generator return: testing_data_generator |
is_test_site() X-Ref |
Does this site (db and dataroot) appear to be used for production? We try very hard to prevent accidental damage done to production servers!! return: bool |
is_test_data_updated() X-Ref |
Returns whether test database and dataroot were created using the current version codebase return: bool |
store_database_state() X-Ref |
Stores the status of the database Serializes the contents and the structure and stores it in the test framework space in dataroot |
store_versions_hash() X-Ref |
Stores the version hash in both database and dataroot |
get_tabledata() X-Ref |
Returns contents of all tables right after installation. return: array $table=>$records |
get_tablestructure() X-Ref |
Returns structure of all tables right after installation. return: array $table=>$records |
get_sequencenames() X-Ref |
Returns the names of sequences for each autoincrementing id field in all standard tables. return: array $table=>$sequencename |
guess_unmodified_empty_tables() X-Ref |
Returns list of tables that are unmodified and empty. return: array of table names, empty if unknown |
get_next_sequence_starting_value($records) X-Ref |
Determine the next unique starting id sequences. param: array $records The records to use to determine the starting value for the table. return: int The value the sequence should be set to. |
reset_all_database_sequences(array $empties = null) X-Ref |
Reset all database sequences to initial values. param: array $empties tables that are known to be unmodified and empty return: void |
reset_database() X-Ref |
Reset all database tables to default values. return: bool true if reset done, false if skipped |
reset_dataroot() X-Ref |
Purge dataroot directory return: void |
get_site_info() X-Ref |
Gets a text-based site version description. return: string The site info |
get_git_hash() X-Ref |
Try to get current git hash of the Moodle in $CFG->dirroot. return: string null if unknown, sha1 hash if known |
drop_database($displayprogress = false) X-Ref |
Drop the whole test database param: bool $displayprogress |
drop_dataroot() X-Ref |
Drops the test framework dataroot |
skip_original_data_files($utilclassname) X-Ref |
Skip the original dataroot files to not been reset. param: string $utilclassname the util class name.. |
save_original_data_files() X-Ref |
Save the list of the original dataroot files into a json file. |
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |