MediaWiki REL1_32
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.
 
 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 = []
 

Detailed Description

Author
Matthew Flaschen

Database Output

Definition at line 11 of file OutputPageTest.php.

Member Function Documentation

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

References $args.

◆ createParserOutputStub()

OutputPageTest::createParserOutputStub (   $args)
private

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

Definition at line 1307 of file OutputPageTest.php.

References $args, and as.

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

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

◆ extractHTMLTitle()

OutputPageTest::extractHTMLTitle ( OutputPage  $op)
private

Definition at line 496 of file OutputPageTest.php.

References $html, $matches, ContextSource\getContext(), and OutputPage\headElement().

Referenced by testHTMLTitle().

◆ getMsgText()

static OutputPageTest::getMsgText (   $op,
  $msgParams 
)
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().

◆ newInstance()

◆ parserOutputHookCallback()

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

Definition at line 1725 of file OutputPageTest.php.

◆ parserOutputHookCallbackStatic()

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

Definition at line 1733 of file OutputPageTest.php.

◆ provideAdaptCdnTTL()

OutputPageTest::provideAdaptCdnTTL ( )

Definition at line 2083 of file OutputPageTest.php.

References $wgSquidMaxage, and false.

◆ provideAddAcceptLanguage()

OutputPageTest::provideAddAcceptLanguage ( )

Definition at line 2422 of file OutputPageTest.php.

◆ provideAddWikiText()

OutputPageTest::provideAddWikiText ( )

Definition at line 1468 of file OutputPageTest.php.

References $args, $ret, as, false, and true.

◆ provideBacklinkSubtitle()

OutputPageTest::provideBacklinkSubtitle ( )

Definition at line 697 of file OutputPageTest.php.

◆ provideBuildExemptModules()

static OutputPageTest::provideBuildExemptModules ( )
static

Definition at line 2661 of file OutputPageTest.php.

◆ provideCdnCacheEpoch()

static OutputPageTest::provideCdnCacheEpoch ( )
static

Definition at line 443 of file OutputPageTest.php.

References $base.

◆ provideCheckLastModified()

OutputPageTest::provideCheckLastModified ( )

Definition at line 370 of file OutputPageTest.php.

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

◆ provideGetCategories()

OutputPageTest::provideGetCategories ( )

Definition at line 1100 of file OutputPageTest.php.

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

◆ provideGetFrameOptions()

OutputPageTest::provideGetFrameOptions ( )

Definition at line 2493 of file OutputPageTest.php.

References false.

◆ provideLinkHeaders()

OutputPageTest::provideLinkHeaders ( )

Definition at line 2347 of file OutputPageTest.php.

References false.

◆ provideMakeResourceLoaderLink()

static OutputPageTest::provideMakeResourceLoaderLink ( )
static

◆ provideParse()

OutputPageTest::provideParse ( )

Definition at line 1825 of file OutputPageTest.php.

References false, and true.

◆ provideParseAs()

OutputPageTest::provideParseAs ( )

Definition at line 1921 of file OutputPageTest.php.

References false, and true.

◆ providePreloadLinkHeaders()

OutputPageTest::providePreloadLinkHeaders ( )

Definition at line 2954 of file OutputPageTest.php.

◆ provideRedirect()

OutputPageTest::provideRedirect ( )

Definition at line 45 of file OutputPageTest.php.

◆ provideRevisionId()

OutputPageTest::provideRevisionId ( )

Definition at line 1244 of file OutputPageTest.php.

◆ provideTransformFilePath()

static OutputPageTest::provideTransformFilePath ( )
static

Definition at line 2728 of file OutputPageTest.php.

◆ provideVaryHeaders()

OutputPageTest::provideVaryHeaders ( )

Definition at line 2226 of file OutputPageTest.php.

◆ setUp()

OutputPageTest::setUp ( )
protected

Reimplemented from MediaWikiTestCase.

Definition at line 16 of file OutputPageTest.php.

References ResourceLoader\clearCache().

◆ setupCategoryTests()

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

◆ tearDown()

OutputPageTest::tearDown ( )
protected

Reimplemented from MediaWikiTestCase.

Definition at line 20 of file OutputPageTest.php.

References ResourceLoader\clearCache().

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

References $args, and $options.

◆ testAddAcceptLanguage()

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

provideAddAcceptLanguage OutputPage::addAcceptLanguage OutputPage::getKeyHeader

Definition at line 2373 of file OutputPageTest.php.

References $code, $options, $req, anything, and as.

◆ testAddBacklinkSubtitle()

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().

◆ testAddBodyClasses()

OutputPageTest::testAddBodyClasses ( )

OutputPage::addBodyClasses.

Definition at line 288 of file OutputPageTest.php.

References 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 ]
callback$variantLinkCallbackCallback to replace findVariantLink() call
array$expectedNormalExpected return value of getCategoryLinks['normal']
array$expectedHiddenExpected return value of getCategoryLinks['hidden']

Definition at line 919 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 941 of file OutputPageTest.php.

References $args, as, 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 191 of file OutputPageTest.php.

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

◆ testAddDeprecatedScriptFileWarning()

OutputPageTest::testAddDeprecatedScriptFileWarning ( )

Test that addScriptFile() throws due to deprecation.

OutputPage::addScriptFile

Definition at line 177 of file OutputPageTest.php.

References newInstance().

◆ testAddHelpLink()

OutputPageTest::testAddHelpLink ( )

OutputPage::addHelpLink OutputPage::getIndicators.

Definition at line 1187 of file OutputPageTest.php.

◆ testAddInlineScript()

OutputPageTest::testAddInlineScript ( )

OutputPage::addInlineScript.

Definition at line 202 of file OutputPageTest.php.

References newInstance().

◆ testAddLink()

OutputPageTest::testAddLink ( )

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

Definition at line 103 of file OutputPageTest.php.

References $link, as, and newInstance().

◆ testAddParserOutput()

OutputPageTest::testAddParserOutput ( )

OutputPage::addParserOutput.

Definition at line 1771 of file OutputPageTest.php.

◆ testAddParserOutputText()

OutputPageTest::testAddParserOutputText ( )

OutputPage::addParserOutputText.

Definition at line 1755 of file OutputPageTest.php.

◆ testAddScript()

OutputPageTest::testAddScript ( )

OutputPage::addScript.

Definition at line 150 of file OutputPageTest.php.

References newInstance().

◆ testAddScriptFile()

OutputPageTest::testAddScriptFile ( )

OutputPage::addScriptFile.

Definition at line 160 of file OutputPageTest.php.

References newInstance().

◆ testAddTemplate()

OutputPageTest::testAddTemplate ( )

OutputPage::addTemplate.

Definition at line 1789 of file OutputPageTest.php.

References $template.

◆ testAddWikiMsg()

OutputPageTest::testAddWikiMsg ( )

OutputPage::addWikiMsg.

Definition at line 1646 of file OutputPageTest.php.

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

References $args.

◆ testAddWikiTextAsContentNoTitle()

OutputPageTest::testAddWikiTextAsContentNoTitle ( )

OutputPage::addWikiTextAsContent.

Definition at line 1636 of file OutputPageTest.php.

◆ testAddWikiTextAsInterfaceNoTitle()

OutputPageTest::testAddWikiTextAsInterfaceNoTitle ( )

OutputPage::addWikiTextAsInterface.

Definition at line 1626 of file OutputPageTest.php.

◆ testAddWikiTextNoTitle()

OutputPageTest::testAddWikiTextNoTitle ( )

OutputPage::addWikiText.

Definition at line 1616 of file OutputPageTest.php.

◆ testArticleBodyOnly()

OutputPageTest::testArticleBodyOnly ( )

OutputPage::setArticleBodyOnly OutputPage::getArticleBodyOnly.

Definition at line 304 of file OutputPageTest.php.

References newInstance().

◆ testArticleFlags()

OutputPageTest::testArticleFlags ( )

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

Definition at line 850 of file OutputPageTest.php.

References newInstance().

◆ testBodyHTML()

OutputPageTest::testBodyHTML ( )

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

Definition at line 1210 of file OutputPageTest.php.

◆ testBuildBacklinkSubtitle()

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().

◆ testBuildExemptModules()

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

provideBuildExemptModules

OutputPage::buildExemptModules

Definition at line 2623 of file OutputPageTest.php.

◆ testCdnCacheEpoch()

OutputPageTest::testCdnCacheEpoch (   $params)

provideCdnCacheEpoch

OutputPage::getCdnCacheEpoch

Definition at line 430 of file OutputPageTest.php.

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

◆ testCdnMaxage()

OutputPageTest::testCdnMaxage ( )

OutputPage::setCdnMaxage OutputPage::lowerCdnMaxage.

Definition at line 1999 of file OutputPageTest.php.

◆ testCheckLastModified()

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().

◆ testClickjacking()

OutputPageTest::testClickjacking ( )

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

Definition at line 2443 of file OutputPageTest.php.

◆ testClientCache()

OutputPageTest::testClientCache ( )

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

Definition at line 2116 of file OutputPageTest.php.

◆ testDisable()

OutputPageTest::testDisable ( )

OutputPage::disable OutputPage::isDisabled.

Definition at line 745 of file OutputPageTest.php.

References newInstance().

◆ testFeedLinks()

OutputPageTest::testFeedLinks ( )

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

Definition at line 816 of file OutputPageTest.php.

References $type, as, and newInstance().

◆ testFileSearchOptions()

OutputPageTest::testFileSearchOptions ( )

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

Definition at line 1389 of file OutputPageTest.php.

◆ testFileVersion()

OutputPageTest::testFileVersion ( )

OutputPage::setFileVersion OutputPage::getFileVersion.

Definition at line 1274 of file OutputPageTest.php.

◆ testForceHideNewSectionLink()

OutputPageTest::testForceHideNewSectionLink ( )

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

Definition at line 781 of file OutputPageTest.php.

References createParserOutputStub(), and newInstance().

◆ testGetCacheVaryCookies()

OutputPageTest::testGetCacheVaryCookies ( )

OutputPage::getCacheVaryCookies.

Definition at line 2148 of file OutputPageTest.php.

References $wgCookiePrefix, $wgDBname, and use.

◆ testGetCategoriesInvalid()

OutputPageTest::testGetCategoriesInvalid ( )

OutputPage::getCategories.

Definition at line 1138 of file OutputPageTest.php.

◆ testGetFrameOptions()

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

provideGetFrameOptions OutputPage::getFrameOptions OutputPage::preventClickjacking

Definition at line 2481 of file OutputPageTest.php.

◆ testHandheld()

OutputPageTest::testHandheld ( )

Tests handheld behavior.

OutputPage::transformCssMedia

Definition at line 2902 of file OutputPageTest.php.

◆ testHaveCacheVaryCookies()

OutputPageTest::testHaveCacheVaryCookies ( )

OutputPage::haveCacheVaryCookies.

Definition at line 2179 of file OutputPageTest.php.

References $request.

◆ testHeadItems()

OutputPageTest::testHeadItems ( )

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

Definition at line 236 of file OutputPageTest.php.

References newInstance().

◆ testHeadItemsParserOutput()

OutputPageTest::testHeadItemsParserOutput ( )

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

Definition at line 260 of file OutputPageTest.php.

References createParserOutputStub(), and newInstance().

◆ testHTMLTitle()

OutputPageTest::testHTMLTitle ( )

OutputPage::setHTMLTitle OutputPage::getHTMLTitle.

Definition at line 523 of file OutputPageTest.php.

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

◆ testIndicators()

OutputPageTest::testIndicators ( )

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

Definition at line 1155 of file OutputPageTest.php.

◆ testIsTOCEnabled()

OutputPageTest::testIsTOCEnabled ( )

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

Definition at line 2923 of file OutputPageTest.php.

◆ testLanguageLinks()

OutputPageTest::testLanguageLinks ( )

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

Definition at line 880 of file OutputPageTest.php.

References createParserOutputStub(), and newInstance().

◆ testLinkHeaders()

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

provideLinkHeaders

OutputPage::addLinkHeader OutputPage::getLinkHeader

Definition at line 2337 of file OutputPageTest.php.

References $header, and as.

◆ testMakeResourceLoaderLink()

OutputPageTest::testMakeResourceLoaderLink (   $args,
  $expectedHtml 
)

See ResourceLoaderClientHtmlTest for full coverage.

provideMakeResourceLoaderLink

OutputPage::makeResourceLoaderLink

Definition at line 2511 of file OutputPageTest.php.

References $args, and $out.

◆ testMetaTags()

OutputPageTest::testMetaTags ( )

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

Definition at line 75 of file OutputPageTest.php.

References newInstance().

◆ testNoGallery()

OutputPageTest::testNoGallery ( )

OutputPage::addParserOutputMetadata OutputPage::addParserOutput.

Definition at line 1677 of file OutputPageTest.php.

◆ testPageTitle()

OutputPageTest::testPageTitle ( )

OutputPage::setPageTitle OutputPage::getPageTitle.

Definition at line 565 of file OutputPageTest.php.

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

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

◆ testParseAsContentNullTitle()

OutputPageTest::testParseAsContentNullTitle ( )

OutputPage::parseAsContent.

Definition at line 1971 of file OutputPageTest.php.

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

◆ testParseAsInterfaceNullTitle()

OutputPageTest::testParseAsInterfaceNullTitle ( )

OutputPage::parseAsInterface.

Definition at line 1980 of file OutputPageTest.php.

◆ testParseInline()

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

provideParse OutputPage::parseInline

Definition at line 1815 of file OutputPageTest.php.

References $args.

◆ testParseInlineAsInterface()

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

provideParseAs OutputPage::parseInlineAsInterface

Definition at line 1911 of file OutputPageTest.php.

◆ testParseInlineAsInterfaceNullTitle()

OutputPageTest::testParseInlineAsInterfaceNullTitle ( )

OutputPage::parseInlineAsInterface.

Definition at line 1989 of file OutputPageTest.php.

◆ testParseInlineNullTitle()

OutputPageTest::testParseInlineNullTitle ( )

OutputPage::parseInline.

Definition at line 1962 of file OutputPageTest.php.

◆ testParseNullTitle()

OutputPageTest::testParseNullTitle ( )

OutputPage::parse.

Definition at line 1953 of file OutputPageTest.php.

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

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

◆ testParserOutputHooks()

OutputPageTest::testParserOutputHooks ( )

OutputPage::addParserOutputMetadata.

Definition at line 1695 of file OutputPageTest.php.

References use.

◆ testPreloadLinkHeaders()

OutputPageTest::testPreloadLinkHeaders (   $config,
  $result 
)

◆ testPrintable()

OutputPageTest::testPrintable ( )

OutputPage::setPrintable OutputPage::isPrintable.

Definition at line 731 of file OutputPageTest.php.

References newInstance().

◆ testPrintRequests()

OutputPageTest::testPrintRequests ( )

Tests print requests.

OutputPage::transformCssMedia

Definition at line 2830 of file OutputPageTest.php.

◆ testProperties()

OutputPageTest::testProperties ( )

OutputPage::setProperty OutputPage::getProperty.

Definition at line 320 of file OutputPageTest.php.

References newInstance().

◆ testRedirect()

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

provideRedirect

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

Definition at line 32 of file OutputPageTest.php.

References $code, and newInstance().

◆ testRevisionId()

OutputPageTest::testRevisionId (   $newVal,
  $expected 
)

provideRevisionId OutputPage::setRevisionId OutputPage::getRevisionId

Definition at line 1235 of file OutputPageTest.php.

◆ testRevisionTimestamp()

OutputPageTest::testRevisionTimestamp ( )

OutputPage::setRevisionTimestamp OutputPage::getRevisionTimestamp.

Definition at line 1260 of file OutputPageTest.php.

◆ testScreenRequests()

OutputPageTest::testScreenRequests ( )

Tests screen requests, without either query parameter set.

OutputPage::transformCssMedia

Definition at line 2865 of file OutputPageTest.php.

◆ testSetCanonicalUrl()

OutputPageTest::testSetCanonicalUrl ( )

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

Definition at line 129 of file OutputPageTest.php.

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

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

◆ testSetCopyrightUrl()

OutputPageTest::testSetCopyrightUrl ( )

OutputPage::setCopyrightUrl OutputPage::getHeadLinksArray.

Definition at line 58 of file OutputPageTest.php.

References newInstance().

◆ testSetIndexFollowPolicies()

OutputPageTest::testSetIndexFollowPolicies ( )

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

Definition at line 487 of file OutputPageTest.php.

References newInstance().

◆ testSetRedirectedFrom()

OutputPageTest::testSetRedirectedFrom ( )

OutputPage::setRedirectedFrom.

Definition at line 554 of file OutputPageTest.php.

References newInstance().

◆ testSetRobotPolicy()

OutputPageTest::testSetRobotPolicy ( )

OutputPage::setRobotPolicy OutputPage::getHeadLinksArray.

Definition at line 474 of file OutputPageTest.php.

References newInstance().

◆ testSetSyndicated()

OutputPageTest::testSetSyndicated ( )

OutputPage::setSyndicated OutputPage::isSyndicated.

Definition at line 799 of file OutputPageTest.php.

References newInstance().

◆ testSetTarget()

OutputPageTest::testSetTarget ( )

OutputPage::getTarget OutputPage::setTarget.

Definition at line 220 of file OutputPageTest.php.

References newInstance().

◆ testSetTitle()

OutputPageTest::testSetTitle ( )

OutputPage::setTitle.

Definition at line 601 of file OutputPageTest.php.

References newInstance().

◆ testShowNewSectionLink()

OutputPageTest::testShowNewSectionLink ( )

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

Definition at line 762 of file OutputPageTest.php.

References createParserOutputStub(), and newInstance().

◆ testSubtitle()

OutputPageTest::testSubtitle ( )

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

Definition at line 617 of file OutputPageTest.php.

References getMsgText(), and newInstance().

◆ testTemplateIds()

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.

◆ testTransformResourcePath()

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.

References $basePath, and $path.

◆ testVaryHeaderDefault()

OutputPageTest::testVaryHeaderDefault ( )

OutputPage::getVaryHeader.

Definition at line 2326 of file OutputPageTest.php.

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

References as.

◆ testWrapWikiMsg()

OutputPageTest::testWrapWikiMsg ( )

OutputPage::wrapWikiMsg.

Definition at line 1661 of file OutputPageTest.php.

References wfMessage().

Member Data Documentation

◆ $fakeTime

int OutputPageTest::$fakeTime
staticprivate

Faked time to set for tests that need it.

Definition at line 2036 of file OutputPageTest.php.

◆ $parserOutputHookCalled

OutputPageTest::$parserOutputHookCalled
staticprivate

Definition at line 1690 of file OutputPageTest.php.

◆ 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: