MediaWiki REL1_31
|
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. | |
testMutators () | |
Wikimedia\Rdbms\Database::tablePrefix Wikimedia\Rdbms\Database::dbSchema. | |
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::onTransactionIdle Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks. | |
testTransactionIdle_TRX () | |
Wikimedia\Rdbms\Database::onTransactionIdle 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 | |
badLockingMethodExplicit (IDatabase $db) | |
badLockingMethodImplicit (IDatabase $db) | |
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 13 of file DatabaseTest.php.
|
private |
Definition at line 519 of file DatabaseTest.php.
References Wikimedia\Rdbms\IDatabase\begin(), and Wikimedia\Rdbms\IDatabase\getScopedLockAndFlush().
Referenced by testGetScopedLock().
|
private |
Definition at line 513 of file DatabaseTest.php.
References Wikimedia\Rdbms\IDatabase\getScopedLockAndFlush(), and Wikimedia\Rdbms\IDatabase\query().
Referenced by testGetScopedLock().
|
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 416 of file DatabaseTest.php.
Referenced by testFlushSnapshot(), testGetScopedLock(), testTransactionIdle_TRX(), testTransactionPreCommitOrIdle(), and testTransactionPreCommitOrIdle_TRX().
|
static |
Definition at line 44 of file DatabaseTest.php.
|
static |
Definition at line 62 of file DatabaseTest.php.
DatabaseTest::provideTableNamesWithIndexClauseOrJOIN | ( | ) |
Definition at line 127 of file DatabaseTest.php.
|
protected |
Definition at line 17 of file DatabaseTest.php.
DatabaseTest::testAddQuotes | ( | $input, | |
$expected ) |
provideAddQuotes Wikimedia\Rdbms\Database::addQuotes
Definition at line 58 of file DatabaseTest.php.
References $input.
DatabaseTest::testDBOIgnoreClear | ( | ) |
UnexpectedValueException Wikimedia\Rdbms\Database::clearFlag.
Definition at line 582 of file DatabaseTest.php.
DatabaseTest::testDBOIgnoreSet | ( | ) |
UnexpectedValueException Wikimedia\Rdbms\Database::setFlag.
Definition at line 569 of file DatabaseTest.php.
DatabaseTest::testFactory | ( | ) |
provideAddQuotes Wikimedia\Rdbms\Database::factory
Definition at line 25 of file DatabaseTest.php.
References false.
DatabaseTest::testFlagSetting | ( | ) |
Wikimedia\Rdbms\Database::getFlag Wikimedia\Rdbms\Database::setFlag Wikimedia\Rdbms\Database::restoreFlags.
Definition at line 530 of file DatabaseTest.php.
DatabaseTest::testFlushSnapshot | ( | ) |
Wikimedia\Rdbms\Database::flushSnapshot.
Definition at line 450 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 472 of file DatabaseTest.php.
References $e, badLockingMethodExplicit(), badLockingMethodImplicit(), DBO_TRX, and getMockDB().
DatabaseTest::testMutators | ( | ) |
Wikimedia\Rdbms\Database::tablePrefix Wikimedia\Rdbms\Database::dbSchema.
Definition at line 595 of file DatabaseTest.php.
DatabaseTest::testTableName | ( | $expected, | |
$table, | |||
$format, | |||
array | $alias = null ) |
provideTableName Wikimedia\Rdbms\Database::tableName
Definition at line 117 of file DatabaseTest.php.
DatabaseTest::testTableNamesWithIndexClauseOrJOIN | ( | $tables, | |
$join_conds, | |||
$expect ) |
provideTableNamesWithIndexClauseOrJOIN Wikimedia\Rdbms\Database::tableNamesWithIndexClauseOrJOIN
Definition at line 167 of file DatabaseTest.php.
References $tables.
DatabaseTest::testTransactionIdle | ( | ) |
Wikimedia\Rdbms\Database::onTransactionIdle Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks.
Definition at line 177 of file DatabaseTest.php.
References DBO_TRX.
DatabaseTest::testTransactionIdle_TRX | ( | ) |
Wikimedia\Rdbms\Database::onTransactionIdle Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks.
Definition at line 218 of file DatabaseTest.php.
References DBO_TRX, and getMockDB().
DatabaseTest::testTransactionListener | ( | ) |
Wikimedia\Rdbms\Database::setTransactionListener.
Definition at line 378 of file DatabaseTest.php.
DatabaseTest::testTransactionPreCommitOrIdle | ( | ) |
Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks.
Definition at line 268 of file DatabaseTest.php.
References DBO_TRX, and getMockDB().
DatabaseTest::testTransactionPreCommitOrIdle_TRX | ( | ) |
Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks.
Definition at line 301 of file DatabaseTest.php.
References DBO_TRX, and getMockDB().
DatabaseTest::testTransactionResolution | ( | ) |
Wikimedia\Rdbms\Database::onTransactionResolution Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks.
Definition at line 349 of file DatabaseTest.php.
References DBO_TRX.