| [ Index ] |
PHP Cross Reference of Moodle 310 |
[Source view] [Print] [Project Stats]
Unit tests for the base_block class.
| Copyright: | 2017 The Open University |
| License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| File Size: | 465 lines (21 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 2 files search/tests/fixtures/testable_core_search.php search/tests/fixtures/mock_block_area.php |
base_block_testcase:: (9 methods):
test_get_block_name()
test_get_document_recordset()
recordset_to_indexed_array()
records_to_ids()
test_get_doc_url()
test_check_access()
test_get_contexts_to_reindex()
get_doc()
test_get_doc_icon()
Class: base_block_testcase - X-Ref
Unit tests for the base_block class.| test_get_block_name() X-Ref |
| Tests getting the name out of the class name. |
| test_get_document_recordset() X-Ref |
| Tests getting the recordset. |
| recordset_to_indexed_array(moodle_recordset $rs) X-Ref |
| Utility function to convert recordset to array for testing. param: moodle_recordset $rs Recordset to convert return: array Array indexed by number (0, 1, 2, ...) |
| records_to_ids(array $recs) X-Ref |
| Utility function to convert records to array of IDs. param: array $recs Records which should have an 'id' field return: array Array of ids |
| test_get_doc_url() X-Ref |
| Tests the get_doc_url function. |
| test_check_access() X-Ref |
| Tests the check_access function. |
| test_get_contexts_to_reindex() X-Ref |
| Tests the block version of get_contexts_to_reindex, which is supposed to return all the block contexts in order of date added. |
| get_doc($courseid, $blockinstanceid) X-Ref |
| Gets a search document object from the fake search area. param: int $courseid Course id in document param: int $blockinstanceid Block instance id in document return: \core_search\document Document object |
| test_get_doc_icon() X-Ref |
| Test document icon. |
| Generated: Wed Jan 22 11:59:49 2025 | Cross-referenced by PHPXref 0.7.1 |