Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Test sqlsrv dml support.

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

Defines 2 classes

sqlsrv_native_moodle_database_testcase:: (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_testcase  - 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