Module talk:Mock title/testcases
Appearance
All tests passed.
Name | Expected | Actual | |
---|---|---|---|
test MockTitle: when no argument table is supplied, an error is raised | |||
test MockTitle: when no title argument is supplied, an error is raised | |||
test MockTitle: when using page name "Example", the prefixedText property equals the page name | |||
test MockTitle: when using page name "fr:Example", the prefixedText property equals the page name | |||
test MockTitle: when using page name "Module:Sandbox", the prefixedText property equals the page name | |||
test MockTitle: when using page name "Module:Sandbox/subpage", the prefixedText property equals the page name | |||
test MockTitle: when using page name "mw:Test", the prefixedText property equals the page name | |||
test MockTitle: when using page name "fr:b:Example", the prefixedText property equals the page name | |||
test MockTitle: property id is mocked using the id option | |||
test MockTitle: property isRedirect is mocked using the isRedirect option | |||
test MockTitle: property exists is mocked using the exists option | |||
test MockTitle: property contentModel is mocked using the contentModel option | |||
test MockTitle: passing a page name to the redirectTarget option causes redirectTarget to be a MockTitle object with that page name | |||
test MockTitle: passing an ID to the redirectTarget option causes redirectTarget to be a MockTitle object with that ID | |||
test MockTitle: passing an options table to the redirectTarget option causes redirectTarget to be a MockTitle object with those options | |||
test MockTitle: passing a MockTitle object to the redirectTarget option causes redirectTarget to be that MockTitle object | |||
test MockTitle: when setting option editProtection to "sysop", the protectionLevels table is updated accordingly | |||
test MockTitle: when setting option moveProtection to "sysop", the protectionLevels table is updated accordingly | |||
test MockTitle: when setting option createProtection to "sysop", the protectionLevels table is updated accordingly | |||
test MockTitle: when setting option uploadProtection to "sysop", the protectionLevels table is updated accordingly | |||
test MockTitle: when setting option cascadingEditProtection to "sysop", and when setting the cascadingProtectionSources option, the cascadingProtection table is updated accordingly | |||
test MockTitle: when setting option cascadingMoveProtection to "sysop", and when setting the cascadingProtectionSources option, the cascadingProtection table is updated accordingly | |||
test MockTitle: when setting option cascadingCreateProtection to "sysop", and when setting the cascadingProtectionSources option, the cascadingProtection table is updated accordingly | |||
test MockTitle: when setting option cascadingUploadProtection to "sysop", and when setting the cascadingProtectionSources option, the cascadingProtection table is updated accordingly | |||
test MockTitle: when a cascading protection argument is given, but no cascading protection sources are given, an error is raised | |||
test MockTitle: when a cascading protection argument is given, but the cascading protection sources table is empty, an error is raised | |||
test MockTitle: when cascading protection sources are given, but no cascading protection argument is given, an error is raised | |||
test MockTitle: if the content option is provided, getContent() returns the specified string | |||
test MockTitle: when setting option fileExists to "true", the file table is updated accordingly | |||
test MockTitle: when setting option fileWidth to "123", the file table is updated accordingly | |||
test MockTitle: when setting option fileHeight to "456", the file table is updated accordingly | |||
test MockTitle: when setting option filePages to "table", the file table is updated accordingly | |||
test MockTitle: when setting option fileSize to "1024", the file table is updated accordingly | |||
test MockTitle: when setting option fileMimeType to "image/png", the file table is updated accordingly | |||
test MockTitle: when setting option fileLength to "60", the file table is updated accordingly | |||
test MockTitle: when setting fileExists in a non-file namespace, no file table is set | |||
test MockTitle: when using page "Non-existent article tr9w78ebna0", the fileExists property is not set | |||
test MockTitle: when using page "Talk:Non-existent talk page 34hdbe0pafj", the fileExists property is not set | |||
test MockTitle: when using page "File:Non-existent file 341gh87fgg8", the fileExists property is set | |||
test MockTitle: when using page "Media:Non-existent file pbfhrw3v8d", the fileExists property is set | |||
test MockTitle: if no id option is specified, the real id value is used | |||
test MockTitle: if no isRedirect option is specified, the real isRedirect value is used | |||
test MockTitle: if no exists option is specified, the real exists value is used | |||
test MockTitle: if no contentModel option is specified, the real contentModel value is used | |||
test MockTitle: if no redirectTarget option is specified, the real redirectTarget value is used | |||
test MockTitle: if no editProtection option is specified, the real protectionLevels value is used | |||
test MockTitle: if no redirectTarget option is specified, the real redirectTarget value is used | |||
test MockTitle: if no cascadingEditProtection option is specified, the real cascadingProtection value is used | |||
test MockTitle: if no cascadingProtectionSources option is specified, the real cascadingProtection value is used | |||
test MockTitle: if no content option is specified, getContent() returns the the real content | |||
test MockTitle: the content property is not shared between mock objects | |||
test patchTitleObject: patchTitleObject returns an equivalent object to MockTitle when used on the same title | |||
test patchTitleObject: title arguments are ignored | |||
test registerMockTitle: real titles are used during patching when no mocks are registered | |||
test registerMockTitle: mocks are registered when specified using option table | |||
test registerMockTitle: mocks are registered when specified using mock title | |||
test registerMockCurrentTitle: mocks are registered when specified using option table | |||
test registerMockCurrentTitle: mocks are registered when specified using mock title | |||
test deregisterMockTitle: previously registered titles are not deregistered if a deregistration function is not called | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by title | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by args table | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by ID | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by title object | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by mock title object | |||
test deregisterMockCurrentTitle: the previously registered current title is not deregistered if a deregistration function is not called | |||
test deregisterMockCurrentTitle: the previously registered current title is deregistered if deregisterMockCurrentTitle is called | |||
test registerMockTitles: mocks are registered when specified using option table | |||
test registerMockTitles: mocks are registered when specified using mock title | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by title | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by args table | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by ID | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by title object | |||
test deregisterMockTitle: previously registered titles are deregistered when specified by mock title object | |||
test clearMockTitleRegistry: all mock titles are cleared | |||
test clearAllMockTitles: all registered titles are deregistered when clearAllMockTitles is called | |||
test registered mocks do not share content with standalone mocks when title constructors are patched | |||
test patchTitleNew: new is patched when the func parameter is run | |||
test patchTitleNew: new is not patched before the function is run | |||
test patchTitleNew: new is not patched after the function is run | |||
test patchMakeTitle: makeTitle is patched when the func parameter is run | |||
test patchMakeTitle: makeTitle is not patched before the function is run | |||
test patchMakeTitle: makeTitle is not patched after the function is run | |||
test patchGetCurrentTitle: getCurrentTitle is patched when the func parameter is run | |||
test patchGetCurrentTitle: getCurrentTitle is not patched before the function is run | |||
test patchGetCurrentTitle: getCurrentTitle is not patched after the function is run | |||
test patchTitleConstructors: all title constructors are patched when the func parameter is run | |||
test patchTitleConstructors: title constructors are not patched after the function is run | |||
test patchTitleNew: varargs are passed as arguments to the func parameter | |||
test patchTitleNew: the result of func is returned | |||
test patchMakeTitle: varargs are passed as arguments to the func parameter | |||
test patchMakeTitle: the result of func is returned | |||
test patchGetCurrentTitle: varargs are passed as arguments to the func parameter | |||
test patchGetCurrentTitle: the result of func is returned | |||
test patchTitleConstructors: varargs are passed as arguments to the func parameter | |||
test patchTitleConstructors: the result of func is returned |
Start a discussion about improving the Module:Mock title/testcases page
Talk pages are where people discuss how to make content on Wikipedia the best that it can be. You can use this page to start a discussion with others about how to improve the "Module:Mock title/testcases" page.