MediaWiki REL1_32
|
Public Member Functions | |
provideTableNamesWithIndexClauseOrJOIN () | |
testAddQuotes ( $input, $expected) | |
provideAddQuotes Wikimedia\Rdbms\Database::addQuotes | |
testDBOIgnoreClear () | |
UnexpectedValueException Wikimedia\Rdbms\Database::clearFlag. | |
testDBOIgnoreSet () | |
UnexpectedValueException Wikimedia\Rdbms\Database::setFlag. | |
testFactory () | |
provideAddQuotes Wikimedia\Rdbms\Database::factory | |
testFlagSetting () | |
Wikimedia\Rdbms\Database::getFlag Wikimedia\Rdbms\Database::setFlag Wikimedia\Rdbms\Database::restoreFlags. | |
testFlushSnapshot () | |
Wikimedia\Rdbms\Database::flushSnapshot. | |
testGetScopedLock () | |
Wikimedia\Rdbms\Database::getScopedLockAndFlush Wikimedia\Rdbms\Database::lock Wikimedia\Rdbms\Database::unlock Wikimedia\Rdbms\Database::lockIsFree. | |
testSchemaAndPrefixMutators () | |
Wikimedia\Rdbms\Database::tablePrefix Wikimedia\Rdbms\Database::dbSchema. | |
testSelectDomain () | |
Wikimedia\Rdbms\Database::selectDomain. | |
testTableName ( $expected, $table, $format, array $alias=null) | |
provideTableName Wikimedia\Rdbms\Database::tableName | |
testTableNamesWithIndexClauseOrJOIN ( $tables, $join_conds, $expect) | |
provideTableNamesWithIndexClauseOrJOIN Wikimedia\Rdbms\Database::tableNamesWithIndexClauseOrJOIN | |
testTransactionIdle () | |
Wikimedia\Rdbms\Database::onTransactionCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks. | |
testTransactionIdle_TRX () | |
Wikimedia\Rdbms\Database::onTransactionCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks. | |
testTransactionListener () | |
Wikimedia\Rdbms\Database::setTransactionListener. | |
testTransactionPreCommitOrIdle () | |
Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks. | |
testTransactionPreCommitOrIdle_TRX () | |
Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks. | |
testTransactionResolution () | |
Wikimedia\Rdbms\Database::onTransactionResolution Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks. | |
Static Public Member Functions | |
static | provideAddQuotes () |
static | provideTableName () |
Protected Member Functions | |
setUp () | |
Private Member Functions | |
getMockDB ( $methods=[]) | |
Use this mock instead of DatabaseTestHelper for cases where DatabaseTestHelper is too inflexibile due to mocking too much or being too restrictive about fname matching (e.g. | |
Definition at line 15 of file DatabaseTest.php.
|
private |
Use this mock instead of DatabaseTestHelper for cases where DatabaseTestHelper is too inflexibile due to mocking too much or being too restrictive about fname matching (e.g.
for tests that assert behaviour when the name is a mismatch, we need to catch the error here instead of there).
Definition at line 430 of file DatabaseTest.php.
Referenced by testFlushSnapshot(), testGetScopedLock(), testTransactionIdle_TRX(), testTransactionPreCommitOrIdle(), and testTransactionPreCommitOrIdle_TRX().
|
static |
Definition at line 46 of file DatabaseTest.php.
|
static |
Definition at line 64 of file DatabaseTest.php.
DatabaseTest::provideTableNamesWithIndexClauseOrJOIN | ( | ) |
Definition at line 129 of file DatabaseTest.php.
|
protected |
Definition at line 19 of file DatabaseTest.php.
DatabaseTest::testAddQuotes | ( | $input, | |
$expected ) |
provideAddQuotes Wikimedia\Rdbms\Database::addQuotes
Definition at line 60 of file DatabaseTest.php.
References $input.
DatabaseTest::testDBOIgnoreClear | ( | ) |
UnexpectedValueException Wikimedia\Rdbms\Database::clearFlag.
Definition at line 618 of file DatabaseTest.php.
DatabaseTest::testDBOIgnoreSet | ( | ) |
UnexpectedValueException Wikimedia\Rdbms\Database::setFlag.
Definition at line 605 of file DatabaseTest.php.
DatabaseTest::testFactory | ( | ) |
provideAddQuotes Wikimedia\Rdbms\Database::factory
Definition at line 27 of file DatabaseTest.php.
References false.
DatabaseTest::testFlagSetting | ( | ) |
DatabaseTest::testFlushSnapshot | ( | ) |
Wikimedia\Rdbms\Database::flushSnapshot.
Definition at line 466 of file DatabaseTest.php.
References DBO_TRX, and getMockDB().
DatabaseTest::testGetScopedLock | ( | ) |
Wikimedia\Rdbms\Database::getScopedLockAndFlush Wikimedia\Rdbms\Database::lock Wikimedia\Rdbms\Database::unlock Wikimedia\Rdbms\Database::lockIsFree.
Definition at line 488 of file DatabaseTest.php.
References $e, DBO_TRX, and getMockDB().
DatabaseTest::testSchemaAndPrefixMutators | ( | ) |
Wikimedia\Rdbms\Database::tablePrefix Wikimedia\Rdbms\Database::dbSchema.
Definition at line 631 of file DatabaseTest.php.
DatabaseTest::testSelectDomain | ( | ) |
Wikimedia\Rdbms\Database::selectDomain.
Definition at line 656 of file DatabaseTest.php.
DatabaseTest::testTableName | ( | $expected, | |
$table, | |||
$format, | |||
array | $alias = null ) |
provideTableName Wikimedia\Rdbms\Database::tableName
Definition at line 119 of file DatabaseTest.php.
DatabaseTest::testTableNamesWithIndexClauseOrJOIN | ( | $tables, | |
$join_conds, | |||
$expect ) |
provideTableNamesWithIndexClauseOrJOIN Wikimedia\Rdbms\Database::tableNamesWithIndexClauseOrJOIN
Definition at line 169 of file DatabaseTest.php.
References $tables.
DatabaseTest::testTransactionIdle | ( | ) |
Wikimedia\Rdbms\Database::onTransactionCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks.
Definition at line 179 of file DatabaseTest.php.
References DBO_TRX, Wikimedia\Rdbms\IDatabase\getFlag(), and Wikimedia\Rdbms\IDatabase\setFlag().
DatabaseTest::testTransactionIdle_TRX | ( | ) |
Wikimedia\Rdbms\Database::onTransactionCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks.
Definition at line 220 of file DatabaseTest.php.
References $e, DBO_TRX, and getMockDB().
DatabaseTest::testTransactionListener | ( | ) |
Wikimedia\Rdbms\Database::setTransactionListener.
Definition at line 392 of file DatabaseTest.php.
DatabaseTest::testTransactionPreCommitOrIdle | ( | ) |
Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks.
Definition at line 281 of file DatabaseTest.php.
References Wikimedia\Rdbms\IDatabase\begin(), Wikimedia\Rdbms\IDatabase\commit(), DBO_TRX, getMockDB(), and Wikimedia\Rdbms\IDatabase\onTransactionPreCommitOrIdle().
DatabaseTest::testTransactionPreCommitOrIdle_TRX | ( | ) |
Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks.
Definition at line 314 of file DatabaseTest.php.
References DBO_TRX, and getMockDB().
DatabaseTest::testTransactionResolution | ( | ) |
Wikimedia\Rdbms\Database::onTransactionResolution Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks.
Definition at line 363 of file DatabaseTest.php.
References Wikimedia\Rdbms\IDatabase\begin(), Wikimedia\Rdbms\IDatabase\clearFlag(), Wikimedia\Rdbms\IDatabase\commit(), DBO_TRX, Wikimedia\Rdbms\IDatabase\getFlag(), Wikimedia\Rdbms\IDatabase\onTransactionResolution(), Wikimedia\Rdbms\IDatabase\rollback(), and Wikimedia\Rdbms\IDatabase\setFlag().