MediaWiki
1.30.0
|
Helper for testing the methods from the Database class. More...
Public Member Functions | |
__construct ( $testName, array $opts=[]) | |
addIdentifierQuotes ( $s) | |
affectedRows () | |
dataSeek ( $res, $row) | |
fetchObject ( $res) | |
fetchRow ( $res) | |
fieldInfo ( $table, $field) | |
fieldName ( $res, $n) | |
forceNextResult ( $res) | |
getLastSqls () | |
Returns SQL queries grouped by '; ' Clear the list of queries that have been done so far. More... | |
getServerInfo () | |
getServerVersion () | |
getSoftwareLink () | |
getType () | |
indexInfo ( $table, $index, $fname='Database::indexInfo') | |
insertId () | |
isOpen () | |
lastErrno () | |
lastError () | |
nativeReplace ( $table, $rows, $fname) | |
numFields ( $res) | |
numRows ( $res) | |
open ( $server, $user, $password, $dbName) | |
ping (&$rtt=null) | |
query ( $sql, $fname='', $tempIgnore=false) | |
setExistingTables ( $tablesExists) | |
setUnionSupportsOrderAndLimit ( $v) | |
strencode ( $s) | |
tableExists ( $table, $fname=__METHOD__) | |
unionSupportsOrderAndLimit () | |
Protected Member Functions | |
addSql ( $sql) | |
checkFunctionName ( $fname) | |
closeConnection () | |
doQuery ( $sql) | |
Protected Attributes | |
$lastSqls = [] | |
Array of lastSqls passed to query(), This is an array since some methods in Database can do more than one query. More... | |
array | $nextResult = [] |
List of row arrays. More... | |
$tablesExists | |
Array of tables to be considered as existing by tableExist() Use setExistingTables() to alter. More... | |
$testName = [] | |
CLASS of the test suite, used to determine, if the function name is passed every time to query() More... | |
$unionSupportsOrderAndLimit = true | |
Value to return from unionSupportsOrderAndLimit() More... | |
Helper for testing the methods from the Database class.
Definition at line 10 of file DatabaseTestHelper.php.
DatabaseTestHelper::__construct | ( | $testName, | |
array | $opts = [] |
||
) |
Definition at line 39 of file DatabaseTestHelper.php.
DatabaseTestHelper::addIdentifierQuotes | ( | $s | ) |
Definition at line 97 of file DatabaseTestHelper.php.
References $s.
|
protected |
Definition at line 76 of file DatabaseTestHelper.php.
Referenced by query().
DatabaseTestHelper::affectedRows | ( | ) |
Definition at line 177 of file DatabaseTestHelper.php.
|
protected |
Definition at line 84 of file DatabaseTestHelper.php.
References $fname.
Referenced by query(), and tableExists().
|
protected |
Definition at line 202 of file DatabaseTestHelper.php.
DatabaseTestHelper::dataSeek | ( | $res, | |
$row | |||
) |
Definition at line 157 of file DatabaseTestHelper.php.
|
protected |
Definition at line 206 of file DatabaseTestHelper.php.
References $nextResult, and $res.
DatabaseTestHelper::fetchObject | ( | $res | ) |
Definition at line 133 of file DatabaseTestHelper.php.
DatabaseTestHelper::fetchRow | ( | $res | ) |
Definition at line 137 of file DatabaseTestHelper.php.
DatabaseTestHelper::fieldInfo | ( | $table, | |
$field | |||
) |
Definition at line 169 of file DatabaseTestHelper.php.
DatabaseTestHelper::fieldName | ( | $res, | |
$n | |||
) |
Definition at line 149 of file DatabaseTestHelper.php.
DatabaseTestHelper::forceNextResult | ( | $res | ) |
mixed | $res | Use an array of row arrays to set row result |
Definition at line 72 of file DatabaseTestHelper.php.
References $res.
DatabaseTestHelper::getLastSqls | ( | ) |
Returns SQL queries grouped by '; ' Clear the list of queries that have been done so far.
Definition at line 58 of file DatabaseTestHelper.php.
References $lastSqls.
Referenced by DatabaseSQLTest\assertLastSqlDb().
DatabaseTestHelper::getServerInfo | ( | ) |
Definition at line 189 of file DatabaseTestHelper.php.
DatabaseTestHelper::getServerVersion | ( | ) |
Definition at line 185 of file DatabaseTestHelper.php.
DatabaseTestHelper::getSoftwareLink | ( | ) |
Definition at line 181 of file DatabaseTestHelper.php.
DatabaseTestHelper::getType | ( | ) |
Definition at line 125 of file DatabaseTestHelper.php.
DatabaseTestHelper::indexInfo | ( | $table, | |
$index, | |||
$fname = 'Database::indexInfo' |
|||
) |
Definition at line 173 of file DatabaseTestHelper.php.
DatabaseTestHelper::insertId | ( | ) |
Definition at line 153 of file DatabaseTestHelper.php.
DatabaseTestHelper::isOpen | ( | ) |
Definition at line 193 of file DatabaseTestHelper.php.
DatabaseTestHelper::lastErrno | ( | ) |
Definition at line 161 of file DatabaseTestHelper.php.
DatabaseTestHelper::lastError | ( | ) |
Definition at line 165 of file DatabaseTestHelper.php.
DatabaseTestHelper::nativeReplace | ( | $table, | |
$rows, | |||
$fname | |||
) |
Definition at line 121 of file DatabaseTestHelper.php.
DatabaseTestHelper::numFields | ( | $res | ) |
Definition at line 145 of file DatabaseTestHelper.php.
DatabaseTestHelper::numRows | ( | $res | ) |
Definition at line 141 of file DatabaseTestHelper.php.
DatabaseTestHelper::open | ( | $server, | |
$user, | |||
$password, | |||
$dbName | |||
) |
Definition at line 129 of file DatabaseTestHelper.php.
DatabaseTestHelper::ping | ( | & | $rtt = null | ) |
Definition at line 197 of file DatabaseTestHelper.php.
DatabaseTestHelper::query | ( | $sql, | |
$fname = '' , |
|||
$tempIgnore = false |
|||
) |
Definition at line 102 of file DatabaseTestHelper.php.
References $fname, addSql(), checkFunctionName(), and query.
DatabaseTestHelper::setExistingTables | ( | $tablesExists | ) |
Definition at line 65 of file DatabaseTestHelper.php.
References $tablesExists, and array().
DatabaseTestHelper::setUnionSupportsOrderAndLimit | ( | $v | ) |
Definition at line 217 of file DatabaseTestHelper.php.
References unionSupportsOrderAndLimit().
DatabaseTestHelper::strencode | ( | $s | ) |
Definition at line 92 of file DatabaseTestHelper.php.
References $s.
DatabaseTestHelper::tableExists | ( | $table, | |
$fname = __METHOD__ |
|||
) |
Definition at line 109 of file DatabaseTestHelper.php.
References $fname, array(), checkFunctionName(), and tableName().
DatabaseTestHelper::unionSupportsOrderAndLimit | ( | ) |
Definition at line 213 of file DatabaseTestHelper.php.
References $unionSupportsOrderAndLimit.
Referenced by setUnionSupportsOrderAndLimit().
|
protected |
Array of lastSqls passed to query(), This is an array since some methods in Database can do more than one query.
Cleared when calling getLastSqls().
Definition at line 23 of file DatabaseTestHelper.php.
Referenced by getLastSqls().
|
protected |
|
protected |
Array of tables to be considered as existing by tableExist() Use setExistingTables() to alter.
Definition at line 32 of file DatabaseTestHelper.php.
Referenced by setExistingTables().
|
protected |
CLASS of the test suite, used to determine, if the function name is passed every time to query()
Definition at line 16 of file DatabaseTestHelper.php.
Referenced by __construct().
|
protected |
Value to return from unionSupportsOrderAndLimit()
Definition at line 37 of file DatabaseTestHelper.php.
Referenced by unionSupportsOrderAndLimit().