Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

Test case for sqlsrv dml support.

Copyright: 2017 John Okely
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 290 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

sqlsrv_native_moodle_database_test:: (5 methods):
  setUp()
  add_no_lock_to_temp_tables_provider()
  test_add_no_lock_to_temp_tables()
  has_query_order_by_provider()
  test_has_query_order_by()

temptables_tester:: (2 methods):
  is_temptable()
  dispose()


Class: sqlsrv_native_moodle_database_test  - X-Ref

Test case for sqlsrv dml support.

setUp()   X-Ref
No description

add_no_lock_to_temp_tables_provider()   X-Ref
Dataprovider for test_add_no_lock_to_temp_tables

return: array Data for test_add_no_lock_to_temp_tables

test_add_no_lock_to_temp_tables($input, $expected)   X-Ref
Test add_no_lock_to_temp_tables

param: string $input The input SQL query
param: string $expected The expected resultant query

has_query_order_by_provider()   X-Ref
Data provider for test_has_query_order_by

return: array data for test_has_query_order_by

test_has_query_order_by(string $sql, string $expectedmainquery, bool $expectedresult)   X-Ref
Test has_query_order_by

param: string $sql the query
param: string $expectedmainquery the expected main query
param: bool $expectedresult the expected result

Class: temptables_tester  - X-Ref

Test class for testing temptables

is_temptable($tablename)   X-Ref
Returns if one table, based in the information present in the store, is a temp table

For easy testing, anything with the word 'temp' in it is considered temporary.

param: string $tablename name without prefix of the table we are asking about
return: bool true if the table is a temp table (based in the store info), false if not

dispose()   X-Ref
Dispose the temptables

return: void