See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
DML Table tests.
Copyright: | 2019 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 227 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_dml_table_testcase:: (5 methods):
get_field_select_provider()
test_get_field_select()
extract_from_result_provider()
test_extract_fields_from_result()
test_get_from_sql()
Class: core_dml_table_testcase - X-Ref
DML Table tests.get_field_select_provider() X-Ref |
Data provider for various \core\dml\table method tests. return: array |
test_get_field_select(string $tablename,array $fieldlist,string $primarykey,string $fieldprefix,string $tablealias,string $expected) X-Ref |
Ensure that \core\dml\table::get_field_select() works as expected. param: string $tablename The name of the table param: array $fieldlist The list of fields param: string $primarykey The name of the primary key param: string $fieldprefix The prefix to use for each field param: string $tablealias The table AS alias name param: string $expected The expected SQL |
extract_from_result_provider() X-Ref |
Data provider for \core\dml\table::extract_from_result() tests. return: array |
test_extract_fields_from_result(array $fieldlist,string $primarykey,string $fieldprefix,stdClass $result,stdClass $expected) X-Ref |
Ensure that \core\dml\table::extract_from_result() works as expected. param: array $fieldlist The list of fields param: string $primarykey The name of the primary key param: string $fieldprefix The prefix to use for each field param: stdClass $result The result of the get_records_sql param: stdClass $expected The expected output |
test_get_from_sql(string $tablename,array $fieldlist,string $primarykey,string $fieldprefix,string $tablealias,string $expected) X-Ref |
Ensure that \core\dml\table::get_from_sql() works as expected. param: string $tablename The name of the table param: array $fieldlist The list of fields param: string $primarykey The name of the primary key param: string $fieldprefix The prefix to use for each field param: string $tablealias The table AS alias name param: string $expected The expected SQL |