Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 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/mysqli_native_moodle_database.php
 lib/dml/tests/fixtures/test_moodle_read_slave_trait.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