MediaWiki
REL1_19
|
Inherited by ArticleTest, BitmapMetadataHandlerTest, BitmapScalingTest, CdbTest, CleanUpTest, DatabaseSqliteTest, DatabaseTest, DummyExtensionsTest, EditPageTest, ExifBitmapTest, ExifRotationTest, ExifTest, ExternalStoreTest, ExtraParserTest, FauxResponseTest, FileBackendTest, FileRepoTest, FormatMetadataTest, FormOptionsInitializationTest, FormOptionsTest, GIFHandlerTest, GIFMetadataExtractorTest, GlobalTest, GlobalWithDBTest, HooksTest, HtmlTest, HttpTest, IEUrlExtensionTest, InstallDocFormatterTest, IPTCTest, IPTest, JavaScriptMinifierTest, JpegMetadataExtractorTest, JpegTest, JsonTest, LanguageAmTest, LanguageArTest, LanguageBeTaraskTest, LanguageBeTest, LanguageBhTest, LanguageBsTest, LanguageCsTest, LanguageCuTest, LanguageCyTest, LanguageDsbTest, LanguageFrTest, LanguageGaTest, LanguageGdTest, LanguageGvTest, LanguageHeTest, LanguageHiTest, LanguageHrTest, LanguageHsbTest, LanguageHyTest, LanguageKshTest, LanguageLnTest, LanguageLtTest, LanguageLvTest, LanguageMgTest, LanguageMkTest, LanguageMlTest, LanguageMoTest, LanguageMtTest, LanguageNlTest, LanguageNsoTest, LanguagePlTest, LanguageRoTest, LanguageRuTest, LanguageSeTest, LanguageSgsTest, LanguageShTest, LanguageSkTest, LanguageSlTest, LanguageSmaTest, LanguageSrTest, LanguageTest, LanguageTiTest, LanguageTlTest, LanguageTrTest, LanguageUkTest, LanguageWaTest, LicensesTest, LocalFileTest, MagicVariableTest, MediaHandlerTest, MediaWikiLangTestCase, MWDebugTest, MWFunctionTest, MWNamespaceTest, NewParserTest, ParserOptionsTest, ParserPreloadTest, PathRouterTest, PNGHandlerTest, PNGMetadataExtractorTest, PreprocessorTest, QueryAllSpecialPagesTest, ResourceLoaderTest, RevisionTest, SanitizerTest, SanitizerValidateEmailTest, SearchEngineTest, SearchUpdateTest, SeleniumConfigurationTest, ServicesJsonTest, SiteConfigurationTest, SpecialRecentchangesTest, SpecialSearchTest, StoreBatchTest, StructureTest, SVGMetadataExtractorTest, TagHookTest, TiffTest, TitleMethodsTest, TitleTest, UploadStashTest, UploadTest, UserTest, WebRequestTest, wfAssembleUrl, wfBaseName, wfBCP47, wfExpandUrl, wfRemoveDotSegments, wfShorthandToIntegerTest, wfTimestamp, wfUrlencodeTest, XmlJs, XmlSelectTest, XmlTest, XMPTest, XMPValidateTest, and ZipDirectoryReaderTest.
Public Member Functions | |
__call ($func, $args) | |
__construct ($name=null, array $data=array(), $dataName= '') | |
addDBData () | |
Stub. | |
dbPrefix () | |
getCliArg ($offset) | |
hideDeprecated ($function) | |
Don't throw a warning if $function is deprecated and called later. | |
needsDB () | |
run (PHPUnit_Framework_TestResult $result=NULL) | |
setCliArg ($offset, $value) | |
Static Public Member Functions | |
static | disableInterwikis ($prefix, &$data) |
Public Attributes | |
$regex = '' | |
$runDisabled = false | |
$suite | |
const | DB_PREFIX = 'unittest_' |
Table name prefixes. | |
const | ORA_DB_PREFIX = 'ut_' |
Protected Member Functions | |
checkDbIsSupported () | |
listTables () | |
Protected Attributes | |
$db | |
$oldTablePrefix | |
$reuseDB = false | |
$supportedDBs | |
$tablesUsed = array() | |
$useTemporaryTables = true | |
Private Member Functions | |
addCoreDBData () | |
assertEmpty2 ($value, $msg) | |
initDB () | |
resetDB () | |
Empty all tables so they can be repopulated for tests. | |
Static Private Member Functions | |
static | isNotUnittest ($table) |
static | unprefixTable ($tableName) |
Static Private Attributes | |
static | $dbSetup = false |
Definition at line 3 of file MediaWikiTestCase.php.
MediaWikiTestCase::__construct | ( | $ | name = null , |
array $ | data = array() , |
||
$ | dataName = '' |
||
) |
Definition at line 32 of file MediaWikiTestCase.php.
MediaWikiTestCase::__call | ( | $ | func, |
$ | args | ||
) |
Reimplemented in MWNamespaceTest.
Definition at line 192 of file MediaWikiTestCase.php.
MediaWikiTestCase::addCoreDBData | ( | ) | [private] |
Definition at line 89 of file MediaWikiTestCase.php.
References $page, $user, WikiPage\factory(), User\newFromName(), Title\newFromText(), and User\resetIdByNameCache().
Referenced by run().
Stub.
If a test needs to add additional data to the database, it should implement this method and do so
Reimplemented in NewParserTest, SearchEngineTest, BlockTest, and ApiBlockTest.
Definition at line 87 of file MediaWikiTestCase.php.
Referenced by run().
MediaWikiTestCase::assertEmpty2 | ( | $ | value, |
$ | msg | ||
) | [private] |
Definition at line 210 of file MediaWikiTestCase.php.
MediaWikiTestCase::checkDbIsSupported | ( | ) | [protected] |
Definition at line 243 of file MediaWikiTestCase.php.
Referenced by run().
Definition at line 74 of file MediaWikiTestCase.php.
References DB_PREFIX.
Referenced by initDB(), and DatabaseTest\prefixAndQuote().
static MediaWikiTestCase::disableInterwikis | ( | $ | prefix, |
&$ | data | ||
) | [static] |
Definition at line 263 of file MediaWikiTestCase.php.
MediaWikiTestCase::getCliArg | ( | $ | offset | ) |
Definition at line 249 of file MediaWikiTestCase.php.
Referenced by run(), StoreBatchTest\setUp(), FileBackendTest\setUp(), NewParserTest\setUp(), NewParserTest\setupGlobals(), and NewParserTest\testFuzzTests().
MediaWikiTestCase::hideDeprecated | ( | $ | function | ) |
Don't throw a warning if $function is deprecated and called later.
$function | String |
Definition at line 273 of file MediaWikiTestCase.php.
References wfDeprecated(), wfRestoreWarnings(), and wfSuppressWarnings().
Referenced by BlockTest\testBug29116LoadWithEmptyIp().
MediaWikiTestCase::initDB | ( | ) | [private] |
Definition at line 145 of file MediaWikiTestCase.php.
References $wgDBprefix, CloneDatabase\changePrefix(), dbPrefix(), listTables(), and resetDB().
Referenced by run().
static MediaWikiTestCase::isNotUnittest | ( | $ | table | ) | [static, private] |
Definition at line 219 of file MediaWikiTestCase.php.
MediaWikiTestCase::listTables | ( | ) | [protected] |
Definition at line 223 of file MediaWikiTestCase.php.
References $wgDBprefix.
Referenced by initDB().
Definition at line 78 of file MediaWikiTestCase.php.
Referenced by run().
MediaWikiTestCase::resetDB | ( | ) | [private] |
MediaWikiTestCase::run | ( | PHPUnit_Framework_TestResult $ | result = NULL | ) |
Definition at line 39 of file MediaWikiTestCase.php.
References ObjectCache\$instances, $result, $wgDBprefix, addCoreDBData(), addDBData(), checkDbIsSupported(), getCliArg(), initDB(), needsDB(), resetDB(), and wfGetDB().
Referenced by HooksTest\testNewStyleHooks().
MediaWikiTestCase::setCliArg | ( | $ | offset, |
$ | value | ||
) |
Definition at line 257 of file MediaWikiTestCase.php.
static MediaWikiTestCase::unprefixTable | ( | $ | tableName | ) | [static, private] |
Definition at line 214 of file MediaWikiTestCase.php.
References $wgDBprefix.
MediaWikiTestCase::$db [protected] |
Reimplemented in DatabaseSqliteTest, and DatabaseTest.
Definition at line 11 of file MediaWikiTestCase.php.
MediaWikiTestCase::$dbSetup = false [static, private] |
Definition at line 17 of file MediaWikiTestCase.php.
MediaWikiTestCase::$oldTablePrefix [protected] |
Definition at line 12 of file MediaWikiTestCase.php.
MediaWikiTestCase::$regex = '' |
Reimplemented in NewParserTest.
Definition at line 5 of file MediaWikiTestCase.php.
MediaWikiTestCase::$reuseDB = false [protected] |
Definition at line 14 of file MediaWikiTestCase.php.
MediaWikiTestCase::$runDisabled = false |
Reimplemented in NewParserTest.
Definition at line 6 of file MediaWikiTestCase.php.
MediaWikiTestCase::$suite |
Definition at line 4 of file MediaWikiTestCase.php.
MediaWikiTestCase::$supportedDBs [protected] |
array( 'mysql', 'sqlite', 'postgres', 'oracle' )
Definition at line 25 of file MediaWikiTestCase.php.
MediaWikiTestCase::$tablesUsed = array() [protected] |
Definition at line 15 of file MediaWikiTestCase.php.
MediaWikiTestCase::$useTemporaryTables = true [protected] |
Definition at line 13 of file MediaWikiTestCase.php.
const MediaWikiTestCase::DB_PREFIX = 'unittest_' |
Table name prefixes.
Oracle likes it shorter.
Definition at line 22 of file MediaWikiTestCase.php.
Referenced by dbPrefix().
const MediaWikiTestCase::ORA_DB_PREFIX = 'ut_' |
Definition at line 23 of file MediaWikiTestCase.php.