MediaWiki REL1_33
OutputPageTest Class Reference
Inheritance diagram for OutputPageTest:
Collaboration diagram for OutputPageTest:

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.
 
 testAdditionalFeeds ( $feed, $advertised_feed_types, $message, $additional_feed_type, $present, $non_present, $any_ui_links)
 provideAdditionalFeedData OutputPage::getHeadLinksArray OutputPage::addFeedLink OutputPage::getSyndicationLinks OutputPage::isSyndicated
 
 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.
 
 testRecentChangesFeed ( $feed, $advertised_feed_types, $message, $present, $non_present)
 provideFeedLinkData OutputPage::getHeadLinksArray
 
 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 provideAdditionalFeedData ()
 
static provideBuildExemptModules ()
 
static provideCdnCacheEpoch ()
 
static provideFeedLinkData ()
 
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 (IMaintainableDatabase $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 ATOM_RC_LINK = '<link rel="alternate" type="application/atom+xml" title=" Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"/>'
 
const ATOM_TEST_LINK = '<link rel="alternate" type="application/atom+xml" title="&quot;Test&quot; Atom feed" href="fake-link"/>'
 
const RSS_RC_LINK = '<link rel="alternate" type="application/rss+xml" title=" RSS feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=rss"/>'
 
const RSS_TEST_LINK = '<link rel="alternate" type="application/rss+xml" title="&quot;Test&quot; RSS feed" href="fake-link"/>'
 
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

 assertFeedLinks ( $outputPage, $message, $present, $non_present)
 
 assertFeedUILinks ( $outputPage, $ui_links)
 
 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)
 
 setupFeedLinks ( $feed, $types)
 

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 = []
 

Detailed Description

Author
Matthew Flaschen

Database Output

Definition at line 11 of file OutputPageTest.php.

Member Function Documentation

◆ assertFeedLinks()

OutputPageTest::assertFeedLinks ( $outputPage,
$message,
$present,
$non_present )
private

Definition at line 77 of file OutputPageTest.php.

References $link, and and().

Referenced by testAdditionalFeeds(), and testRecentChangesFeed().

◆ assertFeedUILinks()

OutputPageTest::assertFeedUILinks ( $outputPage,
$ui_links )
private

Definition at line 87 of file OutputPageTest.php.

References and().

Referenced by testAdditionalFeeds().

◆ assertTransformCssMediaCase()

OutputPageTest::assertTransformCssMediaCase ( $args)
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

Parameters
array$argsKey-value array of arguments as shown above

Definition at line 2949 of file OutputPageTest.php.

References $args, and and().

◆ createParserOutputStub()

OutputPageTest::createParserOutputStub ( $args)
private

Call either with arguments $methodName, $returnValue; or an array [ $methodName => $returnValue, $methodName => $returnValue, ... ].

Definition at line 1447 of file OutputPageTest.php.

References $args, and and().

Referenced by testForceHideNewSectionLink(), testHeadItemsParserOutput(), testLanguageLinks(), testParserOutputCategoryLinks(), and testShowNewSectionLink().

◆ doCategoryAsserts()

OutputPageTest::doCategoryAsserts ( $op,
$expectedNormal,
$expectedHidden )
private

◆ doCategoryLinkAsserts()

OutputPageTest::doCategoryLinkAsserts ( $op,
$expectedNormal,
$expectedHidden )
private

◆ extractExpectedCategories()

OutputPageTest::extractExpectedCategories ( array $expected,
$key )
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 1166 of file OutputPageTest.php.

References and().

Referenced by testAddCategoryLinks(), testAddCategoryLinksOneByOne(), testParserOutputCategoryLinks(), and testSetCategoryLinks().

◆ extractHTMLTitle()

OutputPageTest::extractHTMLTitle ( OutputPage $op)
private

Definition at line 623 of file OutputPageTest.php.

References $html, $matches, and and().

Referenced by testHTMLTitle().

◆ getMsgText()

static OutputPageTest::getMsgText ( $op,
$msgParams )
staticprivate

Shorthand for getting the text of a message, in content language.

Definition at line 642 of file OutputPageTest.php.

Referenced by testHTMLTitle(), testPageTitle(), and testSubtitle().

◆ newInstance()

◆ parserOutputHookCallback()

OutputPageTest::parserOutputHookCallback ( OutputPage $op,
ParserOutput $pOut,
$data )

Definition at line 1867 of file OutputPageTest.php.

References $data, and and().

◆ parserOutputHookCallbackStatic()

static OutputPageTest::parserOutputHookCallbackStatic ( OutputPage $op,
ParserOutput $pOut,
$data )
static

Definition at line 1875 of file OutputPageTest.php.

References $data, and and().

◆ provideAdaptCdnTTL()

OutputPageTest::provideAdaptCdnTTL ( )

Definition at line 2226 of file OutputPageTest.php.

References $wgSquidMaxage, and(), false, and null.

◆ provideAddAcceptLanguage()

OutputPageTest::provideAddAcceptLanguage ( )

Definition at line 2565 of file OutputPageTest.php.

◆ provideAdditionalFeedData()

static OutputPageTest::provideAdditionalFeedData ( )
static

Definition at line 144 of file OutputPageTest.php.

References ATOM_RC_LINK, ATOM_TEST_LINK, RSS_RC_LINK, and RSS_TEST_LINK.

◆ provideAddWikiText()

OutputPageTest::provideAddWikiText ( )

Definition at line 1611 of file OutputPageTest.php.

References $args, $ret, and(), false, and true.

◆ provideBacklinkSubtitle()

OutputPageTest::provideBacklinkSubtitle ( )

Definition at line 824 of file OutputPageTest.php.

◆ provideBuildExemptModules()

static OutputPageTest::provideBuildExemptModules ( )
static

Definition at line 2804 of file OutputPageTest.php.

◆ provideCdnCacheEpoch()

static OutputPageTest::provideCdnCacheEpoch ( )
static

Definition at line 570 of file OutputPageTest.php.

References $base.

◆ provideCheckLastModified()

OutputPageTest::provideCheckLastModified ( )

Definition at line 497 of file OutputPageTest.php.

References and(), false, MediaWikiTestCase\getTestUser(), true, and wfTimestamp().

◆ provideFeedLinkData()

static OutputPageTest::provideFeedLinkData ( )
static

Definition at line 99 of file OutputPageTest.php.

References ATOM_RC_LINK, and RSS_RC_LINK.

◆ provideGetCategories()

OutputPageTest::provideGetCategories ( )

Definition at line 1240 of file OutputPageTest.php.

References $link, $title, NS_CATEGORY, and object.

◆ provideGetFrameOptions()

OutputPageTest::provideGetFrameOptions ( )

Definition at line 2636 of file OutputPageTest.php.

References false.

◆ provideLinkHeaders()

OutputPageTest::provideLinkHeaders ( )

Definition at line 2490 of file OutputPageTest.php.

References false.

◆ provideMakeResourceLoaderLink()

static OutputPageTest::provideMakeResourceLoaderLink ( )
static

◆ provideParse()

OutputPageTest::provideParse ( )

Definition at line 1968 of file OutputPageTest.php.

References false, and true.

◆ provideParseAs()

OutputPageTest::provideParseAs ( )

Definition at line 2063 of file OutputPageTest.php.

References false, and true.

◆ providePreloadLinkHeaders()

OutputPageTest::providePreloadLinkHeaders ( )

Definition at line 3097 of file OutputPageTest.php.

References and().

◆ provideRedirect()

OutputPageTest::provideRedirect ( )

Definition at line 53 of file OutputPageTest.php.

◆ provideRevisionId()

OutputPageTest::provideRevisionId ( )

Definition at line 1384 of file OutputPageTest.php.

References null.

◆ provideTransformFilePath()

static OutputPageTest::provideTransformFilePath ( )
static

Definition at line 2871 of file OutputPageTest.php.

References and().

◆ provideVaryHeaders()

OutputPageTest::provideVaryHeaders ( )

Definition at line 2369 of file OutputPageTest.php.

◆ setUp()

OutputPageTest::setUp ( )
protected

Reimplemented from MediaWikiTestCase.

Definition at line 24 of file OutputPageTest.php.

◆ setupCategoryTests()

OutputPageTest::setupCategoryTests ( array $fakeResults,
callable $variantLinkCallback = null )
private

◆ setupFeedLinks()

OutputPageTest::setupFeedLinks ( $feed,
$types )
private

◆ tearDown()

OutputPageTest::tearDown ( )
protected

Reimplemented from MediaWikiTestCase.

Definition at line 28 of file OutputPageTest.php.

◆ testAdaptCdnTTL()

OutputPageTest::testAdaptCdnTTL ( array $args,
$expected,
array $options = [] )

provideAdaptCdnTTL OutputPage::adaptCdnTTL

Parameters
array$argsTo pass to adaptCdnTTL()
int$expectedExpected new value of mCdnMaxageLimit
array$optionsAssociative array: initialMaxage => Maxage to set before calling adaptCdnTTL() (default 86400)

Definition at line 2189 of file OutputPageTest.php.

References $args, $options, and and().

◆ testAddAcceptLanguage()

OutputPageTest::testAddAcceptLanguage ( $code,
array $variants,
array $expected,
array $options = [] )

provideAddAcceptLanguage OutputPage::addAcceptLanguage OutputPage::getKeyHeader

Definition at line 2516 of file OutputPageTest.php.

References $code, $options, $req, and(), anything, and null.

◆ testAddBacklinkSubtitle()

OutputPageTest::testAddBacklinkSubtitle ( $titles,
$queries,
$contains,
$notContains )

provideBacklinkSubtitle

OutputPage::addBacklinkSubtitle OutputPage::getSubtitle

Definition at line 804 of file OutputPageTest.php.

References $queries, $titles, and(), MediaWikiTestCase\editPage(), and newInstance().

◆ testAddBodyClasses()

OutputPageTest::testAddBodyClasses ( )

OutputPage::addBodyClasses.

Definition at line 415 of file OutputPageTest.php.

References and(), and newInstance().

◆ testAddCategoryLinks()

OutputPageTest::testAddCategoryLinks ( array $args,
array $fakeResults,
callable $variantLinkCallback = null,
array $expectedNormal,
array $expectedHidden )

provideGetCategories

OutputPage::addCategoryLinks OutputPage::getCategories OutputPage::getCategoryLinks

Parameters
array$argsArray of form [ category name => sort key ]
array$fakeResultsArray of form [ category name => value to return from mocked LinkBatch ]
callable$variantLinkCallbackCallback to replace findVariantLink() call
array$expectedNormalExpected return value of getCategoryLinks['normal']
array$expectedHiddenExpected return value of getCategoryLinks['hidden']

Definition at line 1059 of file OutputPageTest.php.

References $args, doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().

◆ testAddCategoryLinksOneByOne()

OutputPageTest::testAddCategoryLinksOneByOne ( array $args,
array $fakeResults,
callable $variantLinkCallback = null,
array $expectedNormal,
array $expectedHidden )

provideGetCategories

OutputPage::addCategoryLinks OutputPage::getCategories OutputPage::getCategoryLinks

Definition at line 1081 of file OutputPageTest.php.

References $args, and(), doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().

◆ testAddDeprecatedScriptFileNoOp()

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 318 of file OutputPageTest.php.

References and(), MediaWikiTestCase\hideDeprecated(), and newInstance().

◆ testAddDeprecatedScriptFileWarning()

OutputPageTest::testAddDeprecatedScriptFileWarning ( )

Test that addScriptFile() throws due to deprecation.

OutputPage::addScriptFile

Definition at line 304 of file OutputPageTest.php.

References and(), and newInstance().

◆ testAddHelpLink()

OutputPageTest::testAddHelpLink ( )

OutputPage::addHelpLink OutputPage::getIndicators.

Definition at line 1327 of file OutputPageTest.php.

References and().

◆ testAddInlineScript()

OutputPageTest::testAddInlineScript ( )

OutputPage::addInlineScript.

Definition at line 329 of file OutputPageTest.php.

References and(), and newInstance().

◆ testAdditionalFeeds()

OutputPageTest::testAdditionalFeeds ( $feed,
$advertised_feed_types,
$message,
$additional_feed_type,
$present,
$non_present,
$any_ui_links )

provideAdditionalFeedData OutputPage::getHeadLinksArray OutputPage::addFeedLink OutputPage::getSyndicationLinks OutputPage::isSyndicated

Definition at line 187 of file OutputPageTest.php.

References assertFeedLinks(), assertFeedUILinks(), and setupFeedLinks().

◆ testAddLink()

OutputPageTest::testAddLink ( )

OutputPage::addLink OutputPage::getLinkTags OutputPage::getHeadLinksArray.

Definition at line 230 of file OutputPageTest.php.

References $link, and(), and newInstance().

◆ testAddParserOutput()

OutputPageTest::testAddParserOutput ( )

OutputPage::addParserOutput.

Definition at line 1912 of file OutputPageTest.php.

References and().

◆ testAddParserOutputText()

OutputPageTest::testAddParserOutputText ( )

OutputPage::addParserOutputText.

Definition at line 1896 of file OutputPageTest.php.

References and().

◆ testAddScript()

OutputPageTest::testAddScript ( )

OutputPage::addScript.

Definition at line 277 of file OutputPageTest.php.

References and(), and newInstance().

◆ testAddScriptFile()

OutputPageTest::testAddScriptFile ( )

OutputPage::addScriptFile.

Definition at line 287 of file OutputPageTest.php.

References and(), and newInstance().

◆ testAddTemplate()

OutputPageTest::testAddTemplate ( )

OutputPage::addTemplate.

Definition at line 1930 of file OutputPageTest.php.

References $template, and and().

◆ testAddWikiMsg()

OutputPageTest::testAddWikiMsg ( )

OutputPage::addWikiMsg.

Definition at line 1790 of file OutputPageTest.php.

References and(), and wfMessage().

◆ testAddWikiText()

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 1581 of file OutputPageTest.php.

References $args, and and().

◆ testAddWikiTextAsContentNoTitle()

OutputPageTest::testAddWikiTextAsContentNoTitle ( )

OutputPage::addWikiTextAsContent.

Definition at line 1780 of file OutputPageTest.php.

References and().

◆ testAddWikiTextAsInterfaceNoTitle()

OutputPageTest::testAddWikiTextAsInterfaceNoTitle ( )

OutputPage::addWikiTextAsInterface.

Definition at line 1770 of file OutputPageTest.php.

References and().

◆ testAddWikiTextNoTitle()

OutputPageTest::testAddWikiTextNoTitle ( )

OutputPage::addWikiText.

Definition at line 1759 of file OutputPageTest.php.

References and().

◆ testArticleBodyOnly()

OutputPageTest::testArticleBodyOnly ( )

OutputPage::setArticleBodyOnly OutputPage::getArticleBodyOnly.

Definition at line 431 of file OutputPageTest.php.

References and(), and newInstance().

◆ testArticleFlags()

OutputPageTest::testArticleFlags ( )

OutputPage::setArticleFlag OutputPage::isArticle OutputPage::setArticleRelated OutputPage::isArticleRelated.

Definition at line 990 of file OutputPageTest.php.

References and(), and newInstance().

◆ testBodyHTML()

OutputPageTest::testBodyHTML ( )

OutputPage::prependHTML OutputPage::addHTML OutputPage::addElement OutputPage::clearHTML OutputPage::getHTML.

Definition at line 1350 of file OutputPageTest.php.

References and().

◆ testBuildBacklinkSubtitle()

OutputPageTest::testBuildBacklinkSubtitle ( $titles,
$queries,
$contains,
$notContains )

provideBacklinkSubtitle

OutputPage::buildBacklinkSubtitle

Definition at line 774 of file OutputPageTest.php.

References $queries, $query, $titles, and(), and MediaWikiTestCase\editPage().

◆ testBuildExemptModules()

OutputPageTest::testBuildExemptModules ( array $exemptStyleModules,
$expect )

provideBuildExemptModules

OutputPage::buildExemptModules

Definition at line 2766 of file OutputPageTest.php.

References and(), and any.

◆ testCdnCacheEpoch()

OutputPageTest::testCdnCacheEpoch ( $params)

provideCdnCacheEpoch

OutputPage::getCdnCacheEpoch

Definition at line 557 of file OutputPageTest.php.

References $out, $params, and(), and newInstance().

◆ testCdnMaxage()

OutputPageTest::testCdnMaxage ( )

OutputPage::setCdnMaxage OutputPage::lowerCdnMaxage.

Definition at line 2142 of file OutputPageTest.php.

References and().

◆ testCheckLastModified()

OutputPageTest::testCheckLastModified ( $timestamp,
$ifModifiedSince,
$expected,
$config = [],
$callback = null )

provideCheckLastModified

OutputPage::checkLastModified OutputPage::getCdnCacheEpoch

Definition at line 465 of file OutputPageTest.php.

References $request, and(), and newInstance().

◆ testClickjacking()

OutputPageTest::testClickjacking ( )

OutputPage::preventClickjacking OutputPage::allowClickjacking OutputPage::getPreventClickjacking OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 2586 of file OutputPageTest.php.

References and().

◆ testClientCache()

OutputPageTest::testClientCache ( )

OutputPage::enableClientCache OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 2259 of file OutputPageTest.php.

References and().

◆ testDisable()

OutputPageTest::testDisable ( )

OutputPage::disable OutputPage::isDisabled.

Definition at line 872 of file OutputPageTest.php.

References and(), and newInstance().

◆ testFeedLinks()

OutputPageTest::testFeedLinks ( )

OutputPage::isSyndicated OutputPage::setFeedAppendQuery OutputPage::addFeedLink OutputPage::getSyndicationLinks()

Definition at line 949 of file OutputPageTest.php.

References $type, and(), and newInstance().

◆ testFileSearchOptions()

OutputPageTest::testFileSearchOptions ( )

OutputPage::getFileSearchOptions OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 1529 of file OutputPageTest.php.

References and().

◆ testFileVersion()

OutputPageTest::testFileVersion ( )

OutputPage::setFileVersion OutputPage::getFileVersion.

Definition at line 1414 of file OutputPageTest.php.

References and().

◆ testForceHideNewSectionLink()

OutputPageTest::testForceHideNewSectionLink ( )

OutputPage::forceHideNewSectionLink OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 908 of file OutputPageTest.php.

References and(), createParserOutputStub(), and newInstance().

◆ testGetCacheVaryCookies()

OutputPageTest::testGetCacheVaryCookies ( )

OutputPage::getCacheVaryCookies.

Definition at line 2291 of file OutputPageTest.php.

References $wgCookiePrefix, $wgDBname, and and().

◆ testGetCategoriesInvalid()

OutputPageTest::testGetCategoriesInvalid ( )

OutputPage::getCategories.

Definition at line 1278 of file OutputPageTest.php.

References and().

◆ testGetFrameOptions()

OutputPageTest::testGetFrameOptions ( $breakFrames,
$preventClickjacking,
$editPageFrameOptions,
$expected )

provideGetFrameOptions OutputPage::getFrameOptions OutputPage::preventClickjacking

Definition at line 2624 of file OutputPageTest.php.

References and().

◆ testHandheld()

OutputPageTest::testHandheld ( )

Tests handheld behavior.

OutputPage::transformCssMedia

Definition at line 3045 of file OutputPageTest.php.

◆ testHaveCacheVaryCookies()

OutputPageTest::testHaveCacheVaryCookies ( )

OutputPage::haveCacheVaryCookies.

Definition at line 2322 of file OutputPageTest.php.

References $request, and and().

◆ testHeadItems()

OutputPageTest::testHeadItems ( )

OutputPage::getHeadItemsArray OutputPage::addHeadItem OutputPage::addHeadItems OutputPage::hasHeadItem.

Definition at line 363 of file OutputPageTest.php.

References and(), and newInstance().

◆ testHeadItemsParserOutput()

OutputPageTest::testHeadItemsParserOutput ( )

OutputPage::getHeadItemsArray OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 387 of file OutputPageTest.php.

References and(), createParserOutputStub(), and newInstance().

◆ testHTMLTitle()

OutputPageTest::testHTMLTitle ( )

OutputPage::setHTMLTitle OutputPage::getHTMLTitle.

Definition at line 650 of file OutputPageTest.php.

References and(), extractHTMLTitle(), getMsgText(), and newInstance().

◆ testIndicators()

OutputPageTest::testIndicators ( )

OutputPage::setIndicators OutputPage::getIndicators OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 1295 of file OutputPageTest.php.

References and().

◆ testIsTOCEnabled()

OutputPageTest::testIsTOCEnabled ( )

OutputPage::isTOCEnabled OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 3066 of file OutputPageTest.php.

References and().

◆ testLanguageLinks()

OutputPageTest::testLanguageLinks ( )

OutputPage::addLanguageLinks OutputPage::setLanguageLinks OutputPage::getLanguageLinks OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 1020 of file OutputPageTest.php.

References and(), createParserOutputStub(), and newInstance().

◆ testLinkHeaders()

OutputPageTest::testLinkHeaders ( array $headers,
$result )

provideLinkHeaders

OutputPage::addLinkHeader OutputPage::getLinkHeader

Definition at line 2480 of file OutputPageTest.php.

References $header, and and().

◆ testMakeResourceLoaderLink()

OutputPageTest::testMakeResourceLoaderLink ( $args,
$expectedHtml )

See ResourceLoaderClientHtmlTest for full coverage.

provideMakeResourceLoaderLink

OutputPage::makeResourceLoaderLink

Definition at line 2654 of file OutputPageTest.php.

References $args, $out, and and().

◆ testMetaTags()

OutputPageTest::testMetaTags ( )

OutputPage::addMeta OutputPage::getMetaTags OutputPage::getHeadLinksArray.

Definition at line 202 of file OutputPageTest.php.

References and(), and newInstance().

◆ testNoGallery()

OutputPageTest::testNoGallery ( )

OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 1819 of file OutputPageTest.php.

References and().

◆ testPageTitle()

OutputPageTest::testPageTitle ( )

OutputPage::setPageTitle OutputPage::getPageTitle.

Definition at line 692 of file OutputPageTest.php.

References and(), getMsgText(), and newInstance().

◆ testParse()

OutputPageTest::testParse ( array $args,
$expectedHTML )

provideParse OutputPage::parse

Parameters
array$argsTo pass to parse()
string$expectedHTMLExpected return value for parse()
string$expectedHTMLExpected return value for parseInline(), if different

Definition at line 1947 of file OutputPageTest.php.

References and().

◆ testParseAsContent()

OutputPageTest::testParseAsContent ( array $args,
$expectedHTML,
$expectedHTMLInline = null )

provideParseAs OutputPage::parseAsContent

Parameters
array$argsTo pass to parse()
string$expectedHTMLExpected return value for parseAsContent()
string$expectedHTMLExpected return value for parseInlineAsInterface(), if different

Definition at line 2028 of file OutputPageTest.php.

References and().

◆ testParseAsContentNullTitle()

OutputPageTest::testParseAsContentNullTitle ( )

OutputPage::parseAsContent.

Definition at line 2114 of file OutputPageTest.php.

References and().

◆ testParseAsInterface()

OutputPageTest::testParseAsInterface ( array $args,
$expectedHTML,
$expectedHTMLInline = null )

provideParseAs OutputPage::parseAsInterface

Parameters
array$argsTo pass to parse()
string$expectedHTMLExpected return value for parseAsInterface()
string$expectedHTMLExpected return value for parseInlineAsInterface(), if different

Definition at line 2042 of file OutputPageTest.php.

References and().

◆ testParseAsInterfaceNullTitle()

OutputPageTest::testParseAsInterfaceNullTitle ( )

OutputPage::parseAsInterface.

Definition at line 2123 of file OutputPageTest.php.

References and().

◆ testParseInline()

OutputPageTest::testParseInline ( array $args,
$expectedHTML,
$expectedHTMLInline = null )

provideParse OutputPage::parseInline

Definition at line 1957 of file OutputPageTest.php.

References $args, and and().

◆ testParseInlineAsInterface()

OutputPageTest::testParseInlineAsInterface ( array $args,
$expectedHTML,
$expectedHTMLInline = null )

provideParseAs OutputPage::parseInlineAsInterface

Definition at line 2053 of file OutputPageTest.php.

References and().

◆ testParseInlineAsInterfaceNullTitle()

OutputPageTest::testParseInlineAsInterfaceNullTitle ( )

OutputPage::parseInlineAsInterface.

Definition at line 2132 of file OutputPageTest.php.

References and().

◆ testParseInlineNullTitle()

OutputPageTest::testParseInlineNullTitle ( )

OutputPage::parseInline.

Definition at line 2104 of file OutputPageTest.php.

References and().

◆ testParseNullTitle()

OutputPageTest::testParseNullTitle ( )

OutputPage::parse.

Definition at line 2094 of file OutputPageTest.php.

References and().

◆ testParserOutputCategoryLinks()

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 1139 of file OutputPageTest.php.

References createParserOutputStub(), doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().

◆ testParserOutputHooks()

OutputPageTest::testParserOutputHooks ( )

OutputPage::addParserOutputMetadata.

Definition at line 1837 of file OutputPageTest.php.

References $data, and and().

◆ testPreloadLinkHeaders()

OutputPageTest::testPreloadLinkHeaders ( $config,
$result )

◆ testPrintable()

OutputPageTest::testPrintable ( )

OutputPage::setPrintable OutputPage::isPrintable.

Definition at line 858 of file OutputPageTest.php.

References and(), and newInstance().

◆ testPrintRequests()

OutputPageTest::testPrintRequests ( )

Tests print requests.

OutputPage::transformCssMedia

Definition at line 2973 of file OutputPageTest.php.

◆ testProperties()

OutputPageTest::testProperties ( )

OutputPage::setProperty OutputPage::getProperty.

Definition at line 447 of file OutputPageTest.php.

References and(), and newInstance().

◆ testRecentChangesFeed()

OutputPageTest::testRecentChangesFeed ( $feed,
$advertised_feed_types,
$message,
$present,
$non_present )

provideFeedLinkData OutputPage::getHeadLinksArray

Definition at line 138 of file OutputPageTest.php.

References assertFeedLinks(), and setupFeedLinks().

◆ testRedirect()

OutputPageTest::testRedirect ( $url,
$code = null )

provideRedirect

OutputPage::__construct OutputPage::redirect OutputPage::getRedirect

Definition at line 40 of file OutputPageTest.php.

References $code, and(), and newInstance().

◆ testRevisionId()

OutputPageTest::testRevisionId ( $newVal,
$expected )

provideRevisionId OutputPage::setRevisionId OutputPage::getRevisionId

Definition at line 1375 of file OutputPageTest.php.

References and().

◆ testRevisionTimestamp()

OutputPageTest::testRevisionTimestamp ( )

OutputPage::setRevisionTimestamp OutputPage::getRevisionTimestamp.

Definition at line 1400 of file OutputPageTest.php.

References and().

◆ testScreenRequests()

OutputPageTest::testScreenRequests ( )

Tests screen requests, without either query parameter set.

OutputPage::transformCssMedia

Definition at line 3008 of file OutputPageTest.php.

◆ testSetCanonicalUrl()

OutputPageTest::testSetCanonicalUrl ( )

OutputPage::setCanonicalUrl OutputPage::getCanonicalUrl OutputPage::getHeadLinksArray.

Definition at line 256 of file OutputPageTest.php.

References and(), and newInstance().

◆ testSetCategoryLinks()

OutputPageTest::testSetCategoryLinks ( array $args,
array $fakeResults,
callable $variantLinkCallback = null,
array $expectedNormal,
array $expectedHidden )

provideGetCategories

OutputPage::setCategoryLinks OutputPage::getCategories OutputPage::getCategoryLinks

Definition at line 1111 of file OutputPageTest.php.

References $args, and(), doCategoryAsserts(), doCategoryLinkAsserts(), extractExpectedCategories(), and setupCategoryTests().

◆ testSetCopyrightUrl()

OutputPageTest::testSetCopyrightUrl ( )

OutputPage::setCopyrightUrl OutputPage::getHeadLinksArray.

Definition at line 124 of file OutputPageTest.php.

References and(), and newInstance().

◆ testSetIndexFollowPolicies()

OutputPageTest::testSetIndexFollowPolicies ( )

OutputPage::setIndexPolicy OutputPage::setFollowPolicy OutputPage::getHeadLinksArray.

Definition at line 614 of file OutputPageTest.php.

References and(), and newInstance().

◆ testSetRedirectedFrom()

OutputPageTest::testSetRedirectedFrom ( )

OutputPage::setRedirectedFrom.

Definition at line 681 of file OutputPageTest.php.

References and(), and newInstance().

◆ testSetRobotPolicy()

OutputPageTest::testSetRobotPolicy ( )

OutputPage::setRobotPolicy OutputPage::getHeadLinksArray.

Definition at line 601 of file OutputPageTest.php.

References and(), and newInstance().

◆ testSetSyndicated()

OutputPageTest::testSetSyndicated ( )

OutputPage::setSyndicated OutputPage::isSyndicated.

Definition at line 926 of file OutputPageTest.php.

References and(), and newInstance().

◆ testSetTarget()

OutputPageTest::testSetTarget ( )

OutputPage::getTarget OutputPage::setTarget.

Definition at line 347 of file OutputPageTest.php.

References and(), and newInstance().

◆ testSetTitle()

OutputPageTest::testSetTitle ( )

OutputPage::setTitle.

Definition at line 728 of file OutputPageTest.php.

References and(), and newInstance().

◆ testShowNewSectionLink()

OutputPageTest::testShowNewSectionLink ( )

OutputPage::showNewSectionLink OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 889 of file OutputPageTest.php.

References and(), createParserOutputStub(), and newInstance().

◆ testSubtitle()

OutputPageTest::testSubtitle ( )

OutputPage::setSubtitle OutputPage::clearSubtitle OutputPage::addSubtitle OutputPage::getSubtitle.

Definition at line 744 of file OutputPageTest.php.

References and(), getMsgText(), and newInstance().

◆ testTemplateIds()

OutputPageTest::testTemplateIds ( )

OutputPage::getTemplateIds OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 1482 of file OutputPageTest.php.

References and(), NS_MAIN, NS_MEDIA, NS_PROJECT, and NS_TALK.

◆ testTransformResourcePath()

OutputPageTest::testTransformResourcePath ( $baseDir,
$basePath,
$uploadDir = null,
$uploadPath = null,
$path = null,
$expected = null )

provideTransformFilePath OutputPage::transformFilePath OutputPage::transformResourcePath

Definition at line 2846 of file OutputPageTest.php.

References $basePath, $path, and and().

◆ testVaryHeaderDefault()

OutputPageTest::testVaryHeaderDefault ( )

OutputPage::getVaryHeader.

Definition at line 2469 of file OutputPageTest.php.

References and().

◆ testVaryHeaders()

OutputPageTest::testVaryHeaders ( array $calls,
array $cookies,
$vary,
$key )

provideVaryHeaders

OutputPage::addVaryHeader OutputPage::getVaryHeader OutputPage::getKeyHeader

Parameters
array[]$callsFor each array, call addVaryHeader() with those arguments
string[]$cookiesArray of cookie names to vary on
string$varyText of expected Vary header (including the 'Vary: ')
string$keyText of expected Key header (including the 'Key: ')

Definition at line 2350 of file OutputPageTest.php.

References and(), and any.

◆ testWrapWikiMsg()

OutputPageTest::testWrapWikiMsg ( )

OutputPage::wrapWikiMsg.

Definition at line 1804 of file OutputPageTest.php.

References and(), and wfMessage().

Member Data Documentation

◆ $fakeTime

int OutputPageTest::$fakeTime
staticprivate

Faked time to set for tests that need it.

Definition at line 2179 of file OutputPageTest.php.

◆ $parserOutputHookCalled

OutputPageTest::$parserOutputHookCalled
staticprivate

Definition at line 1832 of file OutputPageTest.php.

◆ ATOM_RC_LINK

const OutputPageTest::ATOM_RC_LINK = '<link rel="alternate" type="application/atom+xml" title=" Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"/>'

Definition at line 17 of file OutputPageTest.php.

Referenced by provideAdditionalFeedData(), and provideFeedLinkData().

◆ ATOM_TEST_LINK

const OutputPageTest::ATOM_TEST_LINK = '<link rel="alternate" type="application/atom+xml" title="&quot;Test&quot; Atom feed" href="fake-link"/>'

Definition at line 20 of file OutputPageTest.php.

Referenced by provideAdditionalFeedData().

◆ RSS_RC_LINK

const OutputPageTest::RSS_RC_LINK = '<link rel="alternate" type="application/rss+xml" title=" RSS feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=rss"/>'

Definition at line 16 of file OutputPageTest.php.

Referenced by provideAdditionalFeedData(), and provideFeedLinkData().

◆ RSS_TEST_LINK

const OutputPageTest::RSS_TEST_LINK = '<link rel="alternate" type="application/rss+xml" title="&quot;Test&quot; RSS feed" href="fake-link"/>'

Definition at line 19 of file OutputPageTest.php.

Referenced by provideAdditionalFeedData().

◆ SCREEN_MEDIA_QUERY

const OutputPageTest::SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)'

Definition at line 12 of file OutputPageTest.php.

◆ SCREEN_ONLY_MEDIA_QUERY

const OutputPageTest::SCREEN_ONLY_MEDIA_QUERY = 'only screen and (min-width: 982px)'

Definition at line 13 of file OutputPageTest.php.


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