MediaWiki REL1_32
|
Public Member Functions | |
parserOutputHookCallback (OutputPage $op, ParserOutput $pOut, $data) | |
provideAdaptCdnTTL () | |
provideAddAcceptLanguage () | |
provideAddWikiText () | |
provideBacklinkSubtitle () | |
provideCheckLastModified () | |
provideGetCategories () | |
provideGetFrameOptions () | |
provideLinkHeaders () | |
provideParse () | |
provideParseAs () | |
providePreloadLinkHeaders () | |
provideRedirect () | |
provideRevisionId () | |
provideVaryHeaders () | |
testAdaptCdnTTL (array $args, $expected, array $options=[]) | |
provideAdaptCdnTTL OutputPage::adaptCdnTTL | |
testAddAcceptLanguage ( $code, array $variants, array $expected, array $options=[]) | |
provideAddAcceptLanguage OutputPage::addAcceptLanguage OutputPage::getKeyHeader | |
testAddBacklinkSubtitle ( $titles, $queries, $contains, $notContains) | |
provideBacklinkSubtitle | |
testAddBodyClasses () | |
OutputPage::addBodyClasses. | |
testAddCategoryLinks (array $args, array $fakeResults, callable $variantLinkCallback=null, array $expectedNormal, array $expectedHidden) | |
provideGetCategories | |
testAddCategoryLinksOneByOne (array $args, array $fakeResults, callable $variantLinkCallback=null, array $expectedNormal, array $expectedHidden) | |
provideGetCategories | |
testAddDeprecatedScriptFileNoOp () | |
Test the actual behavior of the method (in the case where it doesn't throw, e.g., in production). | |
testAddDeprecatedScriptFileWarning () | |
Test that addScriptFile() throws due to deprecation. | |
testAddHelpLink () | |
OutputPage::addHelpLink OutputPage::getIndicators. | |
testAddInlineScript () | |
OutputPage::addInlineScript. | |
testAddLink () | |
OutputPage::addLink OutputPage::getLinkTags OutputPage::getHeadLinksArray. | |
testAddParserOutput () | |
OutputPage::addParserOutput. | |
testAddParserOutputText () | |
OutputPage::addParserOutputText. | |
testAddScript () | |
OutputPage::addScript. | |
testAddScriptFile () | |
OutputPage::addScriptFile. | |
testAddTemplate () | |
OutputPage::addTemplate. | |
testAddWikiMsg () | |
OutputPage::addWikiMsg. | |
testAddWikiText ( $method, array $args, $expected) | |
provideAddWikiText OutputPage::addWikiText OutputPage::addWikiTextAsInterface OutputPage::wrapWikiTextAsInterface OutputPage::addWikiTextAsContent OutputPage::addWikiTextWithTitle OutputPage::addWikiTextTitle OutputPage::addWikiTextTidy OutputPage::addWikiTextTitleTidy OutputPage::getHTML | |
testAddWikiTextAsContentNoTitle () | |
OutputPage::addWikiTextAsContent. | |
testAddWikiTextAsInterfaceNoTitle () | |
OutputPage::addWikiTextAsInterface. | |
testAddWikiTextNoTitle () | |
OutputPage::addWikiText. | |
testArticleBodyOnly () | |
OutputPage::setArticleBodyOnly OutputPage::getArticleBodyOnly. | |
testArticleFlags () | |
OutputPage::setArticleFlag OutputPage::isArticle OutputPage::setArticleRelated OutputPage::isArticleRelated. | |
testBodyHTML () | |
OutputPage::prependHTML OutputPage::addHTML OutputPage::addElement OutputPage::clearHTML OutputPage::getHTML. | |
testBuildBacklinkSubtitle ( $titles, $queries, $contains, $notContains) | |
provideBacklinkSubtitle | |
testBuildExemptModules (array $exemptStyleModules, $expect) | |
provideBuildExemptModules | |
testCdnCacheEpoch ( $params) | |
provideCdnCacheEpoch | |
testCdnMaxage () | |
OutputPage::setCdnMaxage OutputPage::lowerCdnMaxage. | |
testCheckLastModified ( $timestamp, $ifModifiedSince, $expected, $config=[], $callback=null) | |
provideCheckLastModified | |
testClickjacking () | |
OutputPage::preventClickjacking OutputPage::allowClickjacking OutputPage::getPreventClickjacking OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testClientCache () | |
OutputPage::enableClientCache OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testDisable () | |
OutputPage::disable OutputPage::isDisabled. | |
testFeedLinks () | |
OutputPage::isSyndicated OutputPage::setFeedAppendQuery OutputPage::addFeedLink OutputPage::getSyndicationLinks() | |
testFileSearchOptions () | |
OutputPage::getFileSearchOptions OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testFileVersion () | |
OutputPage::setFileVersion OutputPage::getFileVersion. | |
testForceHideNewSectionLink () | |
OutputPage::forceHideNewSectionLink OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testGetCacheVaryCookies () | |
OutputPage::getCacheVaryCookies. | |
testGetCategoriesInvalid () | |
OutputPage::getCategories. | |
testGetFrameOptions ( $breakFrames, $preventClickjacking, $editPageFrameOptions, $expected) | |
provideGetFrameOptions OutputPage::getFrameOptions OutputPage::preventClickjacking | |
testHandheld () | |
Tests handheld behavior. | |
testHaveCacheVaryCookies () | |
OutputPage::haveCacheVaryCookies. | |
testHeadItems () | |
OutputPage::getHeadItemsArray OutputPage::addHeadItem OutputPage::addHeadItems OutputPage::hasHeadItem. | |
testHeadItemsParserOutput () | |
OutputPage::getHeadItemsArray OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testHTMLTitle () | |
OutputPage::setHTMLTitle OutputPage::getHTMLTitle. | |
testIndicators () | |
OutputPage::setIndicators OutputPage::getIndicators OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testIsTOCEnabled () | |
OutputPage::isTOCEnabled OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testLanguageLinks () | |
OutputPage::addLanguageLinks OutputPage::setLanguageLinks OutputPage::getLanguageLinks OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testLinkHeaders (array $headers, $result) | |
provideLinkHeaders | |
testMakeResourceLoaderLink ( $args, $expectedHtml) | |
See ResourceLoaderClientHtmlTest for full coverage. | |
testMetaTags () | |
OutputPage::addMeta OutputPage::getMetaTags OutputPage::getHeadLinksArray. | |
testNoGallery () | |
OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testPageTitle () | |
OutputPage::setPageTitle OutputPage::getPageTitle. | |
testParse (array $args, $expectedHTML) | |
provideParse OutputPage::parse | |
testParseAsContent (array $args, $expectedHTML, $expectedHTMLInline=null) | |
provideParseAs OutputPage::parseAsContent | |
testParseAsContentNullTitle () | |
OutputPage::parseAsContent. | |
testParseAsInterface (array $args, $expectedHTML, $expectedHTMLInline=null) | |
provideParseAs OutputPage::parseAsInterface | |
testParseAsInterfaceNullTitle () | |
OutputPage::parseAsInterface. | |
testParseInline (array $args, $expectedHTML, $expectedHTMLInline=null) | |
provideParse OutputPage::parseInline | |
testParseInlineAsInterface (array $args, $expectedHTML, $expectedHTMLInline=null) | |
provideParseAs OutputPage::parseInlineAsInterface | |
testParseInlineAsInterfaceNullTitle () | |
OutputPage::parseInlineAsInterface. | |
testParseInlineNullTitle () | |
OutputPage::parseInline. | |
testParseNullTitle () | |
OutputPage::parse. | |
testParserOutputCategoryLinks (array $args, array $fakeResults, callable $variantLinkCallback=null, array $expectedNormal, array $expectedHidden) | |
provideGetCategories | |
testParserOutputHooks () | |
OutputPage::addParserOutputMetadata. | |
testPreloadLinkHeaders ( $config, $result) | |
providePreloadLinkHeaders ResourceLoaderSkinModule::getPreloadLinks ResourceLoaderSkinModule::getLogoPreloadlinks | |
testPrintable () | |
OutputPage::setPrintable OutputPage::isPrintable. | |
testPrintRequests () | |
Tests print requests. | |
testProperties () | |
OutputPage::setProperty OutputPage::getProperty. | |
testRedirect ( $url, $code=null) | |
provideRedirect | |
testRevisionId ( $newVal, $expected) | |
provideRevisionId OutputPage::setRevisionId OutputPage::getRevisionId | |
testRevisionTimestamp () | |
OutputPage::setRevisionTimestamp OutputPage::getRevisionTimestamp. | |
testScreenRequests () | |
Tests screen requests, without either query parameter set. | |
testSetCanonicalUrl () | |
OutputPage::setCanonicalUrl OutputPage::getCanonicalUrl OutputPage::getHeadLinksArray. | |
testSetCategoryLinks (array $args, array $fakeResults, callable $variantLinkCallback=null, array $expectedNormal, array $expectedHidden) | |
provideGetCategories | |
testSetCopyrightUrl () | |
OutputPage::setCopyrightUrl OutputPage::getHeadLinksArray. | |
testSetIndexFollowPolicies () | |
OutputPage::setIndexPolicy OutputPage::setFollowPolicy OutputPage::getHeadLinksArray. | |
testSetRedirectedFrom () | |
OutputPage::setRedirectedFrom. | |
testSetRobotPolicy () | |
OutputPage::setRobotPolicy OutputPage::getHeadLinksArray. | |
testSetSyndicated () | |
OutputPage::setSyndicated OutputPage::isSyndicated. | |
testSetTarget () | |
OutputPage::getTarget OutputPage::setTarget. | |
testSetTitle () | |
OutputPage::setTitle. | |
testShowNewSectionLink () | |
OutputPage::showNewSectionLink OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testSubtitle () | |
OutputPage::setSubtitle OutputPage::clearSubtitle OutputPage::addSubtitle OutputPage::getSubtitle. | |
testTemplateIds () | |
OutputPage::getTemplateIds OutputPage::addParserOutputMetadata OutputPage::addParserOutput. | |
testTransformResourcePath ( $baseDir, $basePath, $uploadDir=null, $uploadPath=null, $path=null, $expected=null) | |
provideTransformFilePath OutputPage::transformFilePath OutputPage::transformResourcePath | |
testVaryHeaderDefault () | |
OutputPage::getVaryHeader. | |
testVaryHeaders (array $calls, array $cookies, $vary, $key) | |
provideVaryHeaders | |
testWrapWikiMsg () | |
OutputPage::wrapWikiMsg. | |
Public Member Functions inherited from MediaWikiTestCase | |
__construct ( $name=null, array $data=[], $dataName='') | |
__destruct () | |
addDBData () | |
Stub. | |
addDBDataOnce () | |
Stub. | |
copyTestData (IDatabase $source, IDatabase $target) | |
Copy test data from one database connection to another. | |
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) | |
setContentLang ( $lang) | |
setGroupPermissions ( $newPerms, $newKey=null, $newValue=null) | |
Alters $wgGroupPermissions for the duration of the test. | |
setupAllTestDBs () | |
Set up all test DBs. | |
setUserLang ( $lang) | |
testMediaWikiTestCaseParentSetupCalled () | |
Make sure MediaWikiTestCase extending classes have called their parent setUp method. | |
usesTemporaryTables () | |
Static Public Member Functions | |
static | parserOutputHookCallbackStatic (OutputPage $op, ParserOutput $pOut, $data) |
static | provideBuildExemptModules () |
static | provideCdnCacheEpoch () |
static | provideMakeResourceLoaderLink () |
static | provideTransformFilePath () |
Static Public Member Functions inherited from MediaWikiTestCase | |
static | getMutableTestUser ( $groups=[]) |
Convenience method for getting a mutable test user. | |
static | getTestPrefixFor (IDatabase $db) |
static | getTestSysop () |
Convenience method for getting an immutable admin test user. | |
static | getTestUser ( $groups=[]) |
Convenience method for getting an immutable test user. | |
static | installMockMwServices (Config $configOverrides=null) |
Creates a new "mock" MediaWikiServices instance, and installs it. | |
static | listTables (IMaintainableDatabase $db) |
static | prepareServices (Config $bootstrapConfig) |
static | resetNonServiceCaches () |
Resets some non-service singleton instances and other static caches. | |
static | restoreMwServices () |
Restores the original, non-mock MediaWikiServices instance. | |
static | setUpBeforeClass () |
static | setupTestDB (Database $db, $prefix) |
Creates an empty skeleton of the wiki database by cloning its structure to equivalent tables using the given $prefix. | |
static | teardownTestDB () |
Restores MediaWiki to using the table set (table prefix) it was using before setupTestDB() was called. | |
static | wfResetOutputBuffersBarrier ( $buffer) |
Used as a marker to prevent wfResetOutputBuffers from breaking PHPUnit. | |
Public Attributes | |
const | SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)' |
const | SCREEN_ONLY_MEDIA_QUERY = 'only screen and (min-width: 982px)' |
Public Attributes inherited from MediaWikiTestCase | |
const | DB_PREFIX = 'unittest_' |
Table name prefixes. | |
const | ORA_DB_PREFIX = 'ut_' |
Protected Member Functions | |
assertTransformCssMediaCase ( $args) | |
Tests a particular case of transformCssMedia, using the given input, globals, expected return, and message. | |
setUp () | |
tearDown () | |
Protected Member Functions inherited from MediaWikiTestCase | |
addCoreDBData () | |
addTmpFiles ( $files) | |
arrayWrap (array $elements) | |
Utility method taking an array of elements and wrapping each element in its own array. | |
assertArrayEquals (array $expected, array $actual, $ordered=false, $named=false) | |
Assert that two arrays are equal. | |
assertFileContains ( $fileName, $actualData, $createIfMissing=false, $msg='') | |
Check whether file contains given data. | |
assertHTMLEquals ( $expected, $actual, $msg='') | |
Put each HTML element on its own line and then equals() the results. | |
assertSelect ( $table, $fields, $condition, array $expectedRows, array $options=[], array $join_conds=[]) | |
Asserts that the given database query yields the rows given by $expectedRows. | |
assertType ( $type, $actual, $message='') | |
Asserts the type of the provided value. | |
assertTypeOrValue ( $type, $actual, $value=false, $message='') | |
Asserts that the provided variable is of the specified internal type or equals the $value argument. | |
checkDbIsSupported () | |
checkPHPExtension ( $extName) | |
Check if $extName is a loaded PHP extension, will skip the test whenever it is not loaded. | |
editPage ( $pageName, $text, $summary='', $defaultNs=NS_MAIN) | |
Edits or creates a page/revision. | |
ensureMockDatabaseConnection (IDatabase $db) | |
getDefaultWikitextNS () | |
Returns the ID of a namespace that defaults to Wikitext. | |
getExistingTestPage ( $title=null) | |
Returns a WikiPage representing an existing page. | |
getNewTempDirectory () | |
obtains a new temporary directory | |
getNewTempFile () | |
Obtains a new temporary file name. | |
getNonexistingTestPage ( $title=null) | |
Returns a WikiPage representing a non-existing page. | |
getSchemaOverrides (IMaintainableDatabase $db) | |
Stub. | |
insertPage ( $pageName, $text='Sample page for unit test.', $namespace=null, User $user=null) | |
Insert a new page. | |
isTestInDatabaseGroup () | |
isWikitextNS ( $ns) | |
Returns true if the given namespace defaults to Wikitext according to $wgNamespaceContentModels. | |
markTestSkippedIfDbType ( $type) | |
Skip the test if using the specified database type. | |
markTestSkippedIfNoDiff3 () | |
Check, if $wgDiff3 is set and ready to merge Will mark the calling test as skipped, if not ready. | |
mergeMwGlobalArrayValue ( $name, $values) | |
Merges the given values into a MW global array variable. | |
objectAssociativeSort (array &$array) | |
Does an associative sort that works for objects. | |
overrideMwServices (Config $configOverrides=null, array $services=[]) | |
Stashes the global instance of MediaWikiServices, and installs a new one, allowing test cases to override settings and services. | |
revisionDelete ( $rev, array $value=[Revision::DELETED_TEXT=> 1], $comment='') | |
Revision-deletes a revision. | |
setIniSetting ( $name, $value) | |
Set an ini setting for the duration of the test. | |
setLogger ( $channel, LoggerInterface $logger) | |
Sets the logger for a specified channel, for the duration of the test. | |
setMwGlobals ( $pairs, $value=null) | |
Sets a global, maintaining a stashed version of the previous global to be restored in tearDown. | |
setService ( $name, $object) | |
Sets a service, maintaining a stashed version of the previous service to be restored in tearDown. | |
setTemporaryHook ( $hookName, $handler) | |
Create a temporary hook handler which will be reset by tearDown. | |
stashMwGlobals ( $globalKeys) | |
Stashes the global, will be restored in tearDown() | |
truncateTable ( $tableName, IDatabase $db=null) | |
Empties the given table and resets any auto-increment counters. | |
Private Member Functions | |
createParserOutputStub (... $args) | |
Call either with arguments $methodName, $returnValue; or an array [ $methodName => $returnValue, $methodName => $returnValue, ... ]. | |
doCategoryAsserts ( $op, $expectedNormal, $expectedHidden) | |
doCategoryLinkAsserts ( $op, $expectedNormal, $expectedHidden) | |
extractExpectedCategories (array $expected, $key) | |
We allow different expectations for different tests as an associative array, like [ 'set' => [ ... ], 'default' => [ ... ] ] if setCategoryLinks() will give a different result. | |
extractHTMLTitle (OutputPage $op) | |
newInstance ( $config=[], WebRequest $request=null, $options=[]) | |
setupCategoryTests (array $fakeResults, callable $variantLinkCallback=null) | |
Static Private Member Functions | |
static | getMsgText ( $op,... $msgParams) |
Shorthand for getting the text of a message, in content language. | |
Static Private Attributes | |
static int | $fakeTime |
Faked time to set for tests that need it. | |
static | $parserOutputHookCalled |
Additional Inherited Members | |
Static Public Attributes inherited from MediaWikiTestCase | |
static TestUser[] | $users |
Static Protected Member Functions inherited from MediaWikiTestCase | |
static | getExternalStoreDatabaseConnections () |
Gets master database connections for all of the ExternalStoreDB stores configured in $wgDefaultExternalStore. | |
static | isUsingExternalStoreDB () |
Check whether ExternalStoreDB is being used. | |
static | setupDatabaseWithTestPrefix (IMaintainableDatabase $db, $prefix=null) |
Setups a database with cloned tables using the given prefix. | |
static | setupExternalStoreTestDBs ( $testPrefix=null) |
Clones the External Store database(s) for testing. | |
static | stripStringKeys (&$r) |
Utility function for eliminating all string keys from an array. | |
Protected Attributes inherited from MediaWikiTestCase | |
Database | $db |
Primary database. | |
array | $supportedDBs |
array | $tablesUsed = [] |
Database Output
Definition at line 11 of file OutputPageTest.php.
|
protected |
Tests a particular case of transformCssMedia, using the given input, globals, expected return, and message.
Asserts that $expectedReturn is returned.
options['printableQuery'] - value of query string for printable, or omitted for none options['handheldQuery'] - value of query string for handheld, or omitted for none options['media'] - passed into the method under the same name options['expectedReturn'] - expected return value options['message'] - PHPUnit message for assertion
array | $args | Key-value array of arguments as shown above |
Definition at line 2806 of file OutputPageTest.php.
References $args.
|
private |
Call either with arguments $methodName, $returnValue; or an array [ $methodName => $returnValue, $methodName => $returnValue, ... ].
Definition at line 1307 of file OutputPageTest.php.
Referenced by testForceHideNewSectionLink(), testHeadItemsParserOutput(), testLanguageLinks(), testParserOutputCategoryLinks(), and testShowNewSectionLink().
|
private |
Definition at line 1076 of file OutputPageTest.php.
Referenced by testAddCategoryLinks(), testAddCategoryLinksOneByOne(), testParserOutputCategoryLinks(), and testSetCategoryLinks().
|
private |
Definition at line 1082 of file OutputPageTest.php.
Referenced by testAddCategoryLinks(), testAddCategoryLinksOneByOne(), testParserOutputCategoryLinks(), and testSetCategoryLinks().
|
private |
We allow different expectations for different tests as an associative array, like [ 'set' => [ ... ], 'default' => [ ... ] ] if setCategoryLinks() will give a different result.
Definition at line 1026 of file OutputPageTest.php.
Referenced by testAddCategoryLinks(), testAddCategoryLinksOneByOne(), testParserOutputCategoryLinks(), and testSetCategoryLinks().
|
private |
Definition at line 496 of file OutputPageTest.php.
References $html, $matches, ContextSource\getContext(), and OutputPage\headElement().
Referenced by testHTMLTitle().
|
staticprivate |
Shorthand for getting the text of a message, in content language.
Definition at line 515 of file OutputPageTest.php.
Referenced by testHTMLTitle(), testPageTitle(), and testSubtitle().
|
private |
Definition at line 3018 of file OutputPageTest.php.
References $context, $options, $request, and array().
Referenced by testAddBacklinkSubtitle(), testAddBodyClasses(), testAddDeprecatedScriptFileNoOp(), testAddDeprecatedScriptFileWarning(), testAddInlineScript(), testAddLink(), testAddScript(), testAddScriptFile(), testArticleBodyOnly(), testArticleFlags(), testCdnCacheEpoch(), testCheckLastModified(), testDisable(), testFeedLinks(), testForceHideNewSectionLink(), testHeadItems(), testHeadItemsParserOutput(), testHTMLTitle(), testLanguageLinks(), testMetaTags(), testPageTitle(), testPrintable(), testProperties(), testRedirect(), testSetCanonicalUrl(), testSetCopyrightUrl(), testSetIndexFollowPolicies(), testSetRedirectedFrom(), testSetRobotPolicy(), testSetSyndicated(), testSetTarget(), testSetTitle(), testShowNewSectionLink(), and testSubtitle().
OutputPageTest::parserOutputHookCallback | ( | OutputPage | $op, |
ParserOutput | $pOut, | ||
$data | |||
) |
Definition at line 1725 of file OutputPageTest.php.
|
static |
Definition at line 1733 of file OutputPageTest.php.
OutputPageTest::provideAdaptCdnTTL | ( | ) |
Definition at line 2083 of file OutputPageTest.php.
References $wgSquidMaxage, and false.
OutputPageTest::provideAddAcceptLanguage | ( | ) |
Definition at line 2422 of file OutputPageTest.php.
OutputPageTest::provideAddWikiText | ( | ) |
OutputPageTest::provideBacklinkSubtitle | ( | ) |
Definition at line 697 of file OutputPageTest.php.
|
static |
Definition at line 2661 of file OutputPageTest.php.
|
static |
Definition at line 443 of file OutputPageTest.php.
References $base.
OutputPageTest::provideCheckLastModified | ( | ) |
Definition at line 370 of file OutputPageTest.php.
References false, MediaWikiTestCase\getTestUser(), true, and wfTimestamp().
OutputPageTest::provideGetCategories | ( | ) |
Definition at line 1100 of file OutputPageTest.php.
References $link, $title, NS_CATEGORY, and object.
OutputPageTest::provideGetFrameOptions | ( | ) |
Definition at line 2493 of file OutputPageTest.php.
References false.
OutputPageTest::provideLinkHeaders | ( | ) |
Definition at line 2347 of file OutputPageTest.php.
References false.
|
static |
Definition at line 2565 of file OutputPageTest.php.
References ResourceLoaderModule\TYPE_COMBINED, ResourceLoaderModule\TYPE_SCRIPTS, and ResourceLoaderModule\TYPE_STYLES.
OutputPageTest::provideParse | ( | ) |
Definition at line 1825 of file OutputPageTest.php.
OutputPageTest::provideParseAs | ( | ) |
Definition at line 1921 of file OutputPageTest.php.
OutputPageTest::providePreloadLinkHeaders | ( | ) |
Definition at line 2954 of file OutputPageTest.php.
OutputPageTest::provideRedirect | ( | ) |
Definition at line 45 of file OutputPageTest.php.
OutputPageTest::provideRevisionId | ( | ) |
Definition at line 1244 of file OutputPageTest.php.
|
static |
Definition at line 2728 of file OutputPageTest.php.
OutputPageTest::provideVaryHeaders | ( | ) |
Definition at line 2226 of file OutputPageTest.php.
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 16 of file OutputPageTest.php.
References ResourceLoader\clearCache().
|
private |
Definition at line 1033 of file OutputPageTest.php.
References $title.
Referenced by testAddCategoryLinks(), testAddCategoryLinksOneByOne(), testParserOutputCategoryLinks(), and testSetCategoryLinks().
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 20 of file OutputPageTest.php.
References ResourceLoader\clearCache().
provideAdaptCdnTTL OutputPage::adaptCdnTTL
array | $args | To pass to adaptCdnTTL() |
int | $expected | Expected new value of mCdnMaxageLimit |
array | $options | Associative array: initialMaxage => Maxage to set before calling adaptCdnTTL() (default 86400) |
Definition at line 2046 of file OutputPageTest.php.
OutputPageTest::testAddBacklinkSubtitle | ( | $titles, | |
$queries, | |||
$contains, | |||
$notContains | |||
) |
provideBacklinkSubtitle
OutputPage::addBacklinkSubtitle OutputPage::getSubtitle
Definition at line 677 of file OutputPageTest.php.
References $queries, $titles, as, MediaWikiTestCase\editPage(), and newInstance().
OutputPageTest::testAddBodyClasses | ( | ) |
OutputPage::addBodyClasses.
Definition at line 288 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testAddCategoryLinks | ( | array | $args, |
array | $fakeResults, | ||
callable | $variantLinkCallback = null , |
||
array | $expectedNormal, | ||
array | $expectedHidden | ||
) |
provideGetCategories
OutputPage::addCategoryLinks OutputPage::getCategories OutputPage::getCategoryLinks
array | $args | Array of form [ category name => sort key ] |
array | $fakeResults | Array of form [ category name => value to return from mocked LinkBatch ] |
callback | $variantLinkCallback | Callback to replace findVariantLink() call |
array | $expectedNormal | Expected return value of getCategoryLinks['normal'] |
array | $expectedHidden | Expected return value of getCategoryLinks['hidden'] |
Definition at line 919 of file OutputPageTest.php.
References $args, doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().
OutputPageTest::testAddCategoryLinksOneByOne | ( | array | $args, |
array | $fakeResults, | ||
callable | $variantLinkCallback = null , |
||
array | $expectedNormal, | ||
array | $expectedHidden | ||
) |
provideGetCategories
OutputPage::addCategoryLinks OutputPage::getCategories OutputPage::getCategoryLinks
Definition at line 941 of file OutputPageTest.php.
References $args, as, doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().
OutputPageTest::testAddDeprecatedScriptFileNoOp | ( | ) |
Test the actual behavior of the method (in the case where it doesn't throw, e.g., in production).
OutputPage::addScriptFile
Definition at line 191 of file OutputPageTest.php.
References MediaWikiTestCase\hideDeprecated(), and newInstance().
OutputPageTest::testAddDeprecatedScriptFileWarning | ( | ) |
Test that addScriptFile() throws due to deprecation.
OutputPage::addScriptFile
Definition at line 177 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testAddHelpLink | ( | ) |
OutputPage::addHelpLink OutputPage::getIndicators.
Definition at line 1187 of file OutputPageTest.php.
OutputPageTest::testAddInlineScript | ( | ) |
OutputPage::addInlineScript.
Definition at line 202 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testAddLink | ( | ) |
OutputPage::addLink OutputPage::getLinkTags OutputPage::getHeadLinksArray.
Definition at line 103 of file OutputPageTest.php.
References $link, as, and newInstance().
OutputPageTest::testAddParserOutput | ( | ) |
OutputPage::addParserOutput.
Definition at line 1771 of file OutputPageTest.php.
OutputPageTest::testAddParserOutputText | ( | ) |
OutputPage::addParserOutputText.
Definition at line 1755 of file OutputPageTest.php.
OutputPageTest::testAddScript | ( | ) |
OutputPageTest::testAddScriptFile | ( | ) |
OutputPage::addScriptFile.
Definition at line 160 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testAddTemplate | ( | ) |
OutputPageTest::testAddWikiMsg | ( | ) |
OutputPageTest::testAddWikiText | ( | $method, | |
array | $args, | ||
$expected | |||
) |
provideAddWikiText OutputPage::addWikiText OutputPage::addWikiTextAsInterface OutputPage::wrapWikiTextAsInterface OutputPage::addWikiTextAsContent OutputPage::addWikiTextWithTitle OutputPage::addWikiTextTitle OutputPage::addWikiTextTidy OutputPage::addWikiTextTitleTidy OutputPage::getHTML
Definition at line 1441 of file OutputPageTest.php.
References $args.
OutputPageTest::testAddWikiTextAsContentNoTitle | ( | ) |
OutputPage::addWikiTextAsContent.
Definition at line 1636 of file OutputPageTest.php.
OutputPageTest::testAddWikiTextAsInterfaceNoTitle | ( | ) |
OutputPage::addWikiTextAsInterface.
Definition at line 1626 of file OutputPageTest.php.
OutputPageTest::testAddWikiTextNoTitle | ( | ) |
OutputPage::addWikiText.
Definition at line 1616 of file OutputPageTest.php.
OutputPageTest::testArticleBodyOnly | ( | ) |
OutputPage::setArticleBodyOnly OutputPage::getArticleBodyOnly.
Definition at line 304 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testArticleFlags | ( | ) |
OutputPage::setArticleFlag OutputPage::isArticle OutputPage::setArticleRelated OutputPage::isArticleRelated.
Definition at line 850 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testBodyHTML | ( | ) |
OutputPage::prependHTML OutputPage::addHTML OutputPage::addElement OutputPage::clearHTML OutputPage::getHTML.
Definition at line 1210 of file OutputPageTest.php.
OutputPageTest::testBuildBacklinkSubtitle | ( | $titles, | |
$queries, | |||
$contains, | |||
$notContains | |||
) |
provideBacklinkSubtitle
OutputPage::buildBacklinkSubtitle
Definition at line 647 of file OutputPageTest.php.
References $queries, $query, $title, $titles, as, and MediaWikiTestCase\editPage().
OutputPageTest::testBuildExemptModules | ( | array | $exemptStyleModules, |
$expect | |||
) |
provideBuildExemptModules
OutputPage::buildExemptModules
Definition at line 2623 of file OutputPageTest.php.
OutputPageTest::testCdnCacheEpoch | ( | $params | ) |
provideCdnCacheEpoch
OutputPage::getCdnCacheEpoch
Definition at line 430 of file OutputPageTest.php.
References $out, $params, and newInstance().
OutputPageTest::testCdnMaxage | ( | ) |
OutputPage::setCdnMaxage OutputPage::lowerCdnMaxage.
Definition at line 1999 of file OutputPageTest.php.
OutputPageTest::testCheckLastModified | ( | $timestamp, | |
$ifModifiedSince, | |||
$expected, | |||
$config = [] , |
|||
$callback = null |
|||
) |
provideCheckLastModified
OutputPage::checkLastModified OutputPage::getCdnCacheEpoch
Definition at line 338 of file OutputPageTest.php.
References $request, and newInstance().
OutputPageTest::testClickjacking | ( | ) |
OutputPage::preventClickjacking OutputPage::allowClickjacking OutputPage::getPreventClickjacking OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 2443 of file OutputPageTest.php.
OutputPageTest::testClientCache | ( | ) |
OutputPage::enableClientCache OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 2116 of file OutputPageTest.php.
OutputPageTest::testDisable | ( | ) |
OutputPage::disable OutputPage::isDisabled.
Definition at line 745 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testFeedLinks | ( | ) |
OutputPage::isSyndicated OutputPage::setFeedAppendQuery OutputPage::addFeedLink OutputPage::getSyndicationLinks()
Definition at line 816 of file OutputPageTest.php.
References $type, as, and newInstance().
OutputPageTest::testFileSearchOptions | ( | ) |
OutputPage::getFileSearchOptions OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 1389 of file OutputPageTest.php.
OutputPageTest::testFileVersion | ( | ) |
OutputPage::setFileVersion OutputPage::getFileVersion.
Definition at line 1274 of file OutputPageTest.php.
OutputPageTest::testForceHideNewSectionLink | ( | ) |
OutputPage::forceHideNewSectionLink OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 781 of file OutputPageTest.php.
References createParserOutputStub(), and newInstance().
OutputPageTest::testGetCacheVaryCookies | ( | ) |
OutputPage::getCacheVaryCookies.
Definition at line 2148 of file OutputPageTest.php.
References $wgCookiePrefix, $wgDBname, and use.
OutputPageTest::testGetCategoriesInvalid | ( | ) |
OutputPage::getCategories.
Definition at line 1138 of file OutputPageTest.php.
OutputPageTest::testGetFrameOptions | ( | $breakFrames, | |
$preventClickjacking, | |||
$editPageFrameOptions, | |||
$expected | |||
) |
provideGetFrameOptions OutputPage::getFrameOptions OutputPage::preventClickjacking
Definition at line 2481 of file OutputPageTest.php.
OutputPageTest::testHandheld | ( | ) |
Tests handheld behavior.
OutputPage::transformCssMedia
Definition at line 2902 of file OutputPageTest.php.
OutputPageTest::testHaveCacheVaryCookies | ( | ) |
OutputPage::haveCacheVaryCookies.
Definition at line 2179 of file OutputPageTest.php.
References $request.
OutputPageTest::testHeadItems | ( | ) |
OutputPage::getHeadItemsArray OutputPage::addHeadItem OutputPage::addHeadItems OutputPage::hasHeadItem.
Definition at line 236 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testHeadItemsParserOutput | ( | ) |
OutputPage::getHeadItemsArray OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 260 of file OutputPageTest.php.
References createParserOutputStub(), and newInstance().
OutputPageTest::testHTMLTitle | ( | ) |
OutputPage::setHTMLTitle OutputPage::getHTMLTitle.
Definition at line 523 of file OutputPageTest.php.
References extractHTMLTitle(), getMsgText(), and newInstance().
OutputPageTest::testIndicators | ( | ) |
OutputPage::setIndicators OutputPage::getIndicators OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 1155 of file OutputPageTest.php.
OutputPageTest::testIsTOCEnabled | ( | ) |
OutputPage::isTOCEnabled OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 2923 of file OutputPageTest.php.
OutputPageTest::testLanguageLinks | ( | ) |
OutputPage::addLanguageLinks OutputPage::setLanguageLinks OutputPage::getLanguageLinks OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 880 of file OutputPageTest.php.
References createParserOutputStub(), and newInstance().
OutputPageTest::testLinkHeaders | ( | array | $headers, |
$result | |||
) |
provideLinkHeaders
OutputPage::addLinkHeader OutputPage::getLinkHeader
Definition at line 2337 of file OutputPageTest.php.
OutputPageTest::testMakeResourceLoaderLink | ( | $args, | |
$expectedHtml | |||
) |
See ResourceLoaderClientHtmlTest for full coverage.
provideMakeResourceLoaderLink
OutputPage::makeResourceLoaderLink
Definition at line 2511 of file OutputPageTest.php.
OutputPageTest::testMetaTags | ( | ) |
OutputPage::addMeta OutputPage::getMetaTags OutputPage::getHeadLinksArray.
Definition at line 75 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testNoGallery | ( | ) |
OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 1677 of file OutputPageTest.php.
OutputPageTest::testPageTitle | ( | ) |
OutputPage::setPageTitle OutputPage::getPageTitle.
Definition at line 565 of file OutputPageTest.php.
References getMsgText(), and newInstance().
OutputPageTest::testParse | ( | array | $args, |
$expectedHTML | |||
) |
provideParse OutputPage::parse
array | $args | To pass to parse() |
string | $expectedHTML | Expected return value for parse() |
string | $expectedHTML | Expected return value for parseInline(), if different |
Definition at line 1806 of file OutputPageTest.php.
OutputPageTest::testParseAsContent | ( | array | $args, |
$expectedHTML, | |||
$expectedHTMLInline = null |
|||
) |
provideParseAs OutputPage::parseAsContent
array | $args | To pass to parse() |
string | $expectedHTML | Expected return value for parseAsContent() |
string | $expectedHTML | Expected return value for parseInlineAsInterface(), if different |
Definition at line 1886 of file OutputPageTest.php.
OutputPageTest::testParseAsContentNullTitle | ( | ) |
OutputPage::parseAsContent.
Definition at line 1971 of file OutputPageTest.php.
OutputPageTest::testParseAsInterface | ( | array | $args, |
$expectedHTML, | |||
$expectedHTMLInline = null |
|||
) |
provideParseAs OutputPage::parseAsInterface
array | $args | To pass to parse() |
string | $expectedHTML | Expected return value for parseAsInterface() |
string | $expectedHTML | Expected return value for parseInlineAsInterface(), if different |
Definition at line 1900 of file OutputPageTest.php.
OutputPageTest::testParseAsInterfaceNullTitle | ( | ) |
OutputPage::parseAsInterface.
Definition at line 1980 of file OutputPageTest.php.
OutputPageTest::testParseInline | ( | array | $args, |
$expectedHTML, | |||
$expectedHTMLInline = null |
|||
) |
provideParse OutputPage::parseInline
Definition at line 1815 of file OutputPageTest.php.
References $args.
OutputPageTest::testParseInlineAsInterface | ( | array | $args, |
$expectedHTML, | |||
$expectedHTMLInline = null |
|||
) |
provideParseAs OutputPage::parseInlineAsInterface
Definition at line 1911 of file OutputPageTest.php.
OutputPageTest::testParseInlineAsInterfaceNullTitle | ( | ) |
OutputPage::parseInlineAsInterface.
Definition at line 1989 of file OutputPageTest.php.
OutputPageTest::testParseInlineNullTitle | ( | ) |
OutputPage::parseInline.
Definition at line 1962 of file OutputPageTest.php.
OutputPageTest::testParseNullTitle | ( | ) |
OutputPage::parse.
Definition at line 1953 of file OutputPageTest.php.
OutputPageTest::testParserOutputCategoryLinks | ( | array | $args, |
array | $fakeResults, | ||
callable | $variantLinkCallback = null , |
||
array | $expectedNormal, | ||
array | $expectedHidden | ||
) |
provideGetCategories
OutputPage::addParserOutputMetadata OutputPage::addParserOutput OutputPage::getCategories OutputPage::getCategoryLinks
Definition at line 999 of file OutputPageTest.php.
References createParserOutputStub(), doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().
OutputPageTest::testParserOutputHooks | ( | ) |
OutputPage::addParserOutputMetadata.
Definition at line 1695 of file OutputPageTest.php.
References use.
OutputPageTest::testPreloadLinkHeaders | ( | $config, | |
$result | |||
) |
providePreloadLinkHeaders ResourceLoaderSkinModule::getPreloadLinks ResourceLoaderSkinModule::getLogoPreloadlinks
Definition at line 2945 of file OutputPageTest.php.
OutputPageTest::testPrintable | ( | ) |
OutputPage::setPrintable OutputPage::isPrintable.
Definition at line 731 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testPrintRequests | ( | ) |
Tests print requests.
OutputPage::transformCssMedia
Definition at line 2830 of file OutputPageTest.php.
OutputPageTest::testProperties | ( | ) |
OutputPage::setProperty OutputPage::getProperty.
Definition at line 320 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testRedirect | ( | $url, | |
$code = null |
|||
) |
provideRedirect
OutputPage::__construct OutputPage::redirect OutputPage::getRedirect
Definition at line 32 of file OutputPageTest.php.
References $code, and newInstance().
OutputPageTest::testRevisionId | ( | $newVal, | |
$expected | |||
) |
provideRevisionId OutputPage::setRevisionId OutputPage::getRevisionId
Definition at line 1235 of file OutputPageTest.php.
OutputPageTest::testRevisionTimestamp | ( | ) |
OutputPage::setRevisionTimestamp OutputPage::getRevisionTimestamp.
Definition at line 1260 of file OutputPageTest.php.
OutputPageTest::testScreenRequests | ( | ) |
Tests screen requests, without either query parameter set.
OutputPage::transformCssMedia
Definition at line 2865 of file OutputPageTest.php.
OutputPageTest::testSetCanonicalUrl | ( | ) |
OutputPage::setCanonicalUrl OutputPage::getCanonicalUrl OutputPage::getHeadLinksArray.
Definition at line 129 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testSetCategoryLinks | ( | array | $args, |
array | $fakeResults, | ||
callable | $variantLinkCallback = null , |
||
array | $expectedNormal, | ||
array | $expectedHidden | ||
) |
provideGetCategories
OutputPage::setCategoryLinks OutputPage::getCategories OutputPage::getCategoryLinks
Definition at line 971 of file OutputPageTest.php.
References $args, doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().
OutputPageTest::testSetCopyrightUrl | ( | ) |
OutputPage::setCopyrightUrl OutputPage::getHeadLinksArray.
Definition at line 58 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testSetIndexFollowPolicies | ( | ) |
OutputPage::setIndexPolicy OutputPage::setFollowPolicy OutputPage::getHeadLinksArray.
Definition at line 487 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testSetRedirectedFrom | ( | ) |
OutputPage::setRedirectedFrom.
Definition at line 554 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testSetRobotPolicy | ( | ) |
OutputPage::setRobotPolicy OutputPage::getHeadLinksArray.
Definition at line 474 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testSetSyndicated | ( | ) |
OutputPage::setSyndicated OutputPage::isSyndicated.
Definition at line 799 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testSetTarget | ( | ) |
OutputPage::getTarget OutputPage::setTarget.
Definition at line 220 of file OutputPageTest.php.
References newInstance().
OutputPageTest::testSetTitle | ( | ) |
OutputPageTest::testShowNewSectionLink | ( | ) |
OutputPage::showNewSectionLink OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 762 of file OutputPageTest.php.
References createParserOutputStub(), and newInstance().
OutputPageTest::testSubtitle | ( | ) |
OutputPage::setSubtitle OutputPage::clearSubtitle OutputPage::addSubtitle OutputPage::getSubtitle.
Definition at line 617 of file OutputPageTest.php.
References getMsgText(), and newInstance().
OutputPageTest::testTemplateIds | ( | ) |
OutputPage::getTemplateIds OutputPage::addParserOutputMetadata OutputPage::addParserOutput.
Definition at line 1342 of file OutputPageTest.php.
References NS_MAIN, NS_MEDIA, NS_PROJECT, and NS_TALK.
OutputPageTest::testTransformResourcePath | ( | $baseDir, | |
$basePath, | |||
$uploadDir = null , |
|||
$uploadPath = null , |
|||
$path = null , |
|||
$expected = null |
|||
) |
provideTransformFilePath OutputPage::transformFilePath OutputPage::transformResourcePath
Definition at line 2703 of file OutputPageTest.php.
OutputPageTest::testVaryHeaderDefault | ( | ) |
OutputPage::getVaryHeader.
Definition at line 2326 of file OutputPageTest.php.
provideVaryHeaders
OutputPage::addVaryHeader OutputPage::getVaryHeader OutputPage::getKeyHeader
array[] | $calls | For each array, call addVaryHeader() with those arguments |
string[] | $cookies | Array of cookie names to vary on |
string | $vary | Text of expected Vary header (including the 'Vary: ') |
string | $key | Text of expected Key header (including the 'Key: ') |
Definition at line 2207 of file OutputPageTest.php.
References as.
OutputPageTest::testWrapWikiMsg | ( | ) |
OutputPage::wrapWikiMsg.
Definition at line 1661 of file OutputPageTest.php.
References wfMessage().
|
staticprivate |
Faked time to set for tests that need it.
Definition at line 2036 of file OutputPageTest.php.
|
staticprivate |
Definition at line 1690 of file OutputPageTest.php.
const OutputPageTest::SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)' |
Definition at line 12 of file OutputPageTest.php.
const OutputPageTest::SCREEN_ONLY_MEDIA_QUERY = 'only screen and (min-width: 982px)' |
Definition at line 13 of file OutputPageTest.php.