MediaWiki  1.23.14
GlobalTest Class Reference
Inheritance diagram for GlobalTest:
Collaboration diagram for GlobalTest:

Public Member Functions

 testArrayToCGI ( $array, $result)
 @dataProvider provideArrayToCGI @covers wfArrayToCgi More...
 
 testArrayToCGI2 ()
 @covers wfArrayToCgi More...
 
 testCgiRoundTrip ( $cgi)
 @dataProvider provideCgiRoundTrip @covers wfArrayToCgi More...
 
 testCgiToArray ( $cgi, $result)
 @dataProvider provideCgiToArray @covers wfCgiToArray More...
 
 testClientAcceptsGzipTest ()
 @covers wfClientAcceptsGzip More...
 
 testDebugFunctionTest ()
 @covers wfDebug @covers wfDebugMem More...
 
 testExpandIRI ()
 @covers wfExpandIRI More...
 
 testMakeUrlIndexes ( $url, $expected)
 @dataProvider provideMakeUrlIndexes() @covers wfMakeUrlIndexes More...
 
 testMerge ( $old, $mine, $yours, $expectedMergeResult, $expectedText)
 
 testMimeTypeMatch ()
 @covers mimeTypeMatch More...
 
 testNegotiateType ()
 @covers wfNegotiateType More...
 
 testRandom ()
 @covers wfRandom More...
 
 testReadOnlyEmpty ()
 @covers wfReadOnly More...
 
 testReadOnlySet ()
 @covers wfReadOnly More...
 
 testSwapVarsTest ()
 @covers swap More...
 
 testUrlencode ()
 @covers wfUrlencode More...
 
 testWfArrayDiff2 ( $a, $b, $expected)
 @dataProvider provideForWfArrayDiff2 @covers wfArrayDiff2 More...
 
 testWfMatchesDomainList ( $url, $domains, $expected, $description)
 @dataProvider provideWfMatchesDomainList @covers wfMatchesDomainList More...
 
 testWfMkdirParents ()
 @covers wfMkdirParents More...
 
 testWfPercentTest ()
 @covers wfPercent More...
 
 testWfShellMaintenanceCmd ( $script, $parameters, $options, $expected, $description)
 @dataProvider provideWfShellMaintenanceCmdList @covers wfShellMaintenanceCmd More...
 
 testWfShorthandToInteger ( $shorthand, $expected)
 test More...
 
- Public Member Functions inherited from MediaWikiTestCase
 __call ( $func, $args)
 
 __construct ( $name=null, array $data=array(), $dataName='')
 
 addDBData ()
 Stub. More...
 
 dbPrefix ()
 
 getCliArg ( $offset)
 
 hideDeprecated ( $function)
 Don't throw a warning if $function is deprecated and called later. More...
 
 needsDB ()
 
 run (PHPUnit_Framework_TestResult $result=null)
 
 setCliArg ( $offset, $value)
 
 testMediaWikiTestCaseParentSetupCalled ()
 Make sure MediaWikiTestCase extending classes have called their parent setUp method. More...
 
 usesTemporaryTables ()
 

Static Public Member Functions

static provideArrayToCGI ()
 
static provideCgiRoundTrip ()
 
static provideCgiToArray ()
 
static provideForWfArrayDiff2 ()
 
static provideMakeUrlIndexes ()
 
static provideMerge ()
 
static provideShorthand ()
 array( shorthand, expected integer ) More...
 
static provideWfMatchesDomainList ()
 
static provideWfShellMaintenanceCmdList ()
 
- Static Public Member Functions inherited from MediaWikiTestCase
static listTables ( $db)
 
static setupTestDB (DatabaseBase $db, $prefix)
 Creates an empty skeleton of the wiki database by cloning its structure to equivalent tables using the given $prefix. More...
 
static teardownTestDB ()
 Restores MediaWiki to using the table set (table prefix) it was using before setupTestDB() was called. More...
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
- Protected Member Functions inherited from MediaWikiTestCase
 arrayWrap (array $elements)
 Utility method taking an array of elements and wrapping each element in it's own array. More...
 
 assertArrayEquals (array $expected, array $actual, $ordered=false, $named=false)
 Assert that two arrays are equal. More...
 
 assertException ( $code, $expected='Exception', $message='')
 Asserts that an exception of the specified type occurs when running the provided code. More...
 
 assertHTMLEquals ( $expected, $actual, $msg='')
 Put each HTML element on its own line and then equals() the results. More...
 
 assertSelect ( $table, $fields, $condition, array $expectedRows)
 Asserts that the given database query yields the rows given by $expectedRows. More...
 
 assertType ( $type, $actual, $message='')
 Asserts the type of the provided value. More...
 
 assertTypeOrValue ( $type, $actual, $value=false, $message='')
 Asserts that the provided variable is of the specified internal type or equals the $value argument. More...
 
 assertValidHtmlDocument ( $html)
 Asserts that the given string is valid HTML document. More...
 
 assertValidHtmlSnippet ( $html)
 Asserts that the given string is a valid HTML snippet. More...
 
 checkDbIsSupported ()
 
 checkHasDiff3 ()
 Check, if $wgDiff3 is set and ready to merge Will mark the calling test as skipped, if not ready. More...
 
 checkHasGzip ()
 Check whether we have the 'gzip' commandline utility, will skip the test whenever "gzip -V" fails. More...
 
 checkPHPExtension ( $extName)
 Check if $extName is a loaded PHP extension, will skip the test whenever it is not loaded. More...
 
 getDefaultWikitextNS ()
 Returns the ID of a namespace that defaults to Wikitext. More...
 
 getNewTempDirectory ()
 obtains a new temporary directory More...
 
 getNewTempFile ()
 Obtains a new temporary file name. More...
 
 isWikitextNS ( $ns)
 Returns true if the given namespace defaults to Wikitext according to $wgNamespaceContentModels. More...
 
 mergeMwGlobalArrayValue ( $name, $values)
 Merges the given values into a MW global array variable. More...
 
 objectAssociativeSort (array &$array)
 Does an associative sort that works for objects. More...
 
 setMwGlobals ( $pairs, $value=null)
 
 stashMwGlobals ( $globalKeys)
 Stashes the global, will be restored in tearDown() More...
 

Additional Inherited Members

- Public Attributes inherited from MediaWikiTestCase
const DB_PREFIX = 'unittest_'
 Table name prefixes. More...
 
const ORA_DB_PREFIX = 'ut_'
 
- Static Public Attributes inherited from MediaWikiTestCase
static $users
 
- Static Protected Member Functions inherited from MediaWikiTestCase
static stripStringKeys (&$r)
 Utility function for eliminating all string keys from an array. More...
 
- Protected Attributes inherited from MediaWikiTestCase
DatabaseBase $db
 
array $supportedDBs
 
array $tablesUsed = array()
 

Detailed Description

Definition at line 3 of file GlobalTest.php.

Member Function Documentation

◆ provideArrayToCGI()

static GlobalTest::provideArrayToCGI ( )
static

Definition at line 118 of file GlobalTest.php.

References array().

◆ provideCgiRoundTrip()

static GlobalTest::provideCgiRoundTrip ( )
static

Definition at line 178 of file GlobalTest.php.

References array().

◆ provideCgiToArray()

static GlobalTest::provideCgiToArray ( )
static

Definition at line 155 of file GlobalTest.php.

References array().

◆ provideForWfArrayDiff2()

static GlobalTest::provideForWfArrayDiff2 ( )
static

Definition at line 43 of file GlobalTest.php.

References array().

◆ provideMakeUrlIndexes()

static GlobalTest::provideMakeUrlIndexes ( )
static

Definition at line 531 of file GlobalTest.php.

References array().

◆ provideMerge()

static GlobalTest::provideMerge ( )
static

Definition at line 467 of file GlobalTest.php.

References array().

◆ provideShorthand()

static GlobalTest::provideShorthand ( )
static

array( shorthand, expected integer )

Definition at line 396 of file GlobalTest.php.

References array(), and strings.

◆ provideWfMatchesDomainList()

static GlobalTest::provideWfMatchesDomainList ( )
static

Definition at line 589 of file GlobalTest.php.

References array(), and as.

◆ provideWfShellMaintenanceCmdList()

static GlobalTest::provideWfShellMaintenanceCmdList ( )
static

Definition at line 632 of file GlobalTest.php.

References array(), and global.

◆ setUp()

GlobalTest::setUp ( )
protected

Reimplemented from MediaWikiTestCase.

Definition at line 4 of file GlobalTest.php.

References array(), MediaWikiTestCase\setMwGlobals(), and wfTempDir().

◆ tearDown()

GlobalTest::tearDown ( )
protected

Reimplemented from MediaWikiTestCase.

Definition at line 22 of file GlobalTest.php.

References global.

◆ testArrayToCGI()

GlobalTest::testArrayToCGI (   $array,
  $result 
)

@dataProvider provideArrayToCGI @covers wfArrayToCgi

Definition at line 140 of file GlobalTest.php.

References wfArrayToCgi().

◆ testArrayToCGI2()

GlobalTest::testArrayToCGI2 ( )

@covers wfArrayToCgi

Definition at line 147 of file GlobalTest.php.

References array(), and wfArrayToCgi().

◆ testCgiRoundTrip()

GlobalTest::testCgiRoundTrip (   $cgi)

@dataProvider provideCgiRoundTrip @covers wfArrayToCgi

Definition at line 195 of file GlobalTest.php.

References wfArrayToCgi(), and wfCgiToArray().

◆ testCgiToArray()

GlobalTest::testCgiToArray (   $cgi,
  $result 
)

@dataProvider provideCgiToArray @covers wfCgiToArray

Definition at line 174 of file GlobalTest.php.

References wfCgiToArray().

◆ testClientAcceptsGzipTest()

GlobalTest::testClientAcceptsGzipTest ( )

@covers wfClientAcceptsGzip

Definition at line 309 of file GlobalTest.php.

References array(), as, wfBoolToStr(), and wfClientAcceptsGzip().

◆ testDebugFunctionTest()

GlobalTest::testDebugFunctionTest ( )

@covers wfDebug @covers wfDebugMem

Definition at line 272 of file GlobalTest.php.

References global, wfDebug(), wfDebugMem(), and wfTempDir().

◆ testExpandIRI()

GlobalTest::testExpandIRI ( )

@covers wfExpandIRI

Definition at line 80 of file GlobalTest.php.

References wfExpandIRI().

◆ testMakeUrlIndexes()

GlobalTest::testMakeUrlIndexes (   $url,
  $expected 
)

@dataProvider provideMakeUrlIndexes() @covers wfMakeUrlIndexes

Definition at line 526 of file GlobalTest.php.

References wfMakeUrlIndexes().

◆ testMerge()

GlobalTest::testMerge (   $old,
  $mine,
  $yours,
  $expectedMergeResult,
  $expectedText 
)
Parameters
string$oldText as it was in the database
string$mineText submitted while user was editing
string$yoursText submitted by the user
bool$expectedMergeResultWhether the merge should be a success
string$expectedTextText after merge has been completed

@dataProvider provideMerge() @group medium @covers wfMerge

Definition at line 450 of file GlobalTest.php.

References MediaWikiTestCase\checkHasDiff3(), and wfMerge().

◆ testMimeTypeMatch()

GlobalTest::testMimeTypeMatch ( )

@covers mimeTypeMatch

Definition at line 202 of file GlobalTest.php.

References array(), and mimeTypeMatch().

◆ testNegotiateType()

GlobalTest::testNegotiateType ( )

@covers wfNegotiateType

Definition at line 227 of file GlobalTest.php.

References array(), and wfNegotiateType().

◆ testRandom()

GlobalTest::testRandom ( )

@covers wfRandom

Definition at line 62 of file GlobalTest.php.

References wfRandom().

◆ testReadOnlyEmpty()

GlobalTest::testReadOnlyEmpty ( )

@covers wfReadOnly

Definition at line 89 of file GlobalTest.php.

References global, and wfReadOnly().

◆ testReadOnlySet()

GlobalTest::testReadOnlySet ( )

@covers wfReadOnly

Definition at line 100 of file GlobalTest.php.

References $f, cache, global, on, and wfReadOnly().

◆ testSwapVarsTest()

GlobalTest::testSwapVarsTest ( )

@covers swap

Definition at line 343 of file GlobalTest.php.

References swap().

◆ testUrlencode()

GlobalTest::testUrlencode ( )

@covers wfUrlencode

Definition at line 71 of file GlobalTest.php.

References wfUrlencode().

◆ testWfArrayDiff2()

GlobalTest::testWfArrayDiff2 (   $a,
  $b,
  $expected 
)

@dataProvider provideForWfArrayDiff2 @covers wfArrayDiff2

Definition at line 36 of file GlobalTest.php.

References wfArrayDiff2().

◆ testWfMatchesDomainList()

GlobalTest::testWfMatchesDomainList (   $url,
  $domains,
  $expected,
  $description 
)

@dataProvider provideWfMatchesDomainList @covers wfMatchesDomainList

Definition at line 584 of file GlobalTest.php.

References wfMatchesDomainList().

◆ testWfMkdirParents()

GlobalTest::testWfMkdirParents ( )

◆ testWfPercentTest()

GlobalTest::testWfPercentTest ( )

@covers wfPercent

Definition at line 359 of file GlobalTest.php.

References array(), as, and wfPercent().

◆ testWfShellMaintenanceCmd()

GlobalTest::testWfShellMaintenanceCmd (   $script,
  $parameters,
  $options,
  $expected,
  $description 
)

@dataProvider provideWfShellMaintenanceCmdList @covers wfShellMaintenanceCmd

Definition at line 623 of file GlobalTest.php.

References $options, wfIsWindows(), and wfShellMaintenanceCmd().

◆ testWfShorthandToInteger()

GlobalTest::testWfShorthandToInteger (   $shorthand,
  $expected 
)

test

See also
wfShorthandToInteger() @dataProvider provideShorthand @covers wfShorthandToInteger

Definition at line 389 of file GlobalTest.php.

References wfShorthandToInteger().


The documentation for this class was generated from the following file: