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 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

Database driver test class for testing mysqli_native_moodle_database with moodle_read_slave_trait

Copyright: 2018 Srdjan Janković, Catalyst IT
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 64 lines (2 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 2 files
 lib/dml/tests/fixtures/test_moodle_read_slave_trait.php
 lib/dml/mysqli_native_moodle_database.php

Defines 1 class

read_slave_moodle_database_mock_mysqli:: (2 methods):
  get_tables()
  change_database_structure()


Class: read_slave_moodle_database_mock_mysqli  - X-Ref

Database driver mock test class that exposes some methods

get_tables($usecache = true)   X-Ref
Return tables in database WITHOUT current prefix

param: bool $usecache if true, returns list of cached tables.
return: array of table names in lowercase and without prefix

change_database_structure($sql, $tablenames = null)   X-Ref
To be used by database_manager

param: string|array $sql query
param: array|null $tablenames an array of xmldb table names affected by this request.
return: bool true