wiki.techinc.nl/tests/phpunit/includes
Timo Tijhof b281e3e059 api: Fix unstable ApiQuerySiteinfoTest case relying on default settings
This test failed by default in mediawiki-docker-dev or on any other
more (production-like) set up with a protocol-relative $wgServer value.

It passed in CI where it is set to `http://localhost:9412`.

The test also failed when $wgFileExtensions contained additional
entries for any reason.

Fix both of these tests by simplifying their needless inheriting of
live "current" settings and just set them to explicit example values
and them assert the way the code should behave for those values.

Follows-up 27d41f442a.

Remove use of wfExpandUrl() to formulate the "expected" value.
Expected values that are dynamic are an anti-pattern and greatly
decrease confidence in, and self-documenting value of, a test.

Change-Id: I6f7b8d89767ed8eaacbc615a9f22a3b357a6dd58
2021-05-20 18:55:15 +00:00
..
actions Introduce DummyServicesTrait for use in unit tests 2021-05-03 19:04:06 +00:00
api api: Fix unstable ApiQuerySiteinfoTest case relying on default settings 2021-05-20 18:55:15 +00:00
auth Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
block Introduce infrastructure for partial blocks for actions 2021-04-27 21:53:13 +01:00
cache Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
changes build: Upgrade mediawiki-codesniffer from v35.0.0 to v36.0.0 2021-04-29 13:00:15 -07:00
changetags Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
collation
config Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
content build: Upgrade mediawiki-codesniffer from v35.0.0 to v36.0.0 2021-04-29 13:00:15 -07:00
context Remove $actor field from UsererIdentityValue 2021-04-13 18:18:06 +00:00
db Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
debug Replace PHPUnit ->returnValue() with ->willReturn() shortcut 2021-04-22 10:37:45 +02:00
deferred Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
diff Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
editpage Update Legoktm's email address 2021-05-02 05:39:37 +00:00
exception Remove sepate getMockWgOut() method in exception tests 2021-03-08 03:54:14 +00:00
externalstore Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
filebackend Hard deprecate LockManagerGroup::singleton() and ::destroySingletons() 2021-05-03 18:42:31 +00:00
filerepo Hard deprecate LockManagerGroup::singleton() and ::destroySingletons() 2021-05-03 18:42:31 +00:00
GlobalFunctions MediaHandlerFactory: inject a logger 2021-03-31 17:45:51 +00:00
HookContainer Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
htmlform Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
http phpunit: Mass-replace setMethods with onlyMethods and adjust 2021-04-16 20:15:00 +02:00
import Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
installer Installer: Do not use mediawiki.skinning.interface module 2021-04-15 11:11:32 -07:00
interwiki Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
jobqueue Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
language
libs Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
linkeddata
linker Convert LinkRendererFactoryTest to a pure unit test 2021-03-10 15:35:13 +00:00
logging Stop using legacy ActorMigration field "log_user" 2021-04-28 16:29:04 +10:00
mail Use UserIdentityValue in tests where possible 2021-04-22 09:32:43 +02:00
media phpunit: Mass-replace setMethods with onlyMethods and adjust 2021-04-16 20:15:00 +02:00
Message phpunit: Mass-replace setMethods with onlyMethods and adjust 2021-04-16 20:15:00 +02:00
Navigation
objectcache Make SqlBagOStuffTest a pure unit test 2021-02-27 02:22:41 +00:00
page Remove Revision from PageArchive 2021-04-30 21:14:13 +00:00
pager Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
ParamValidator/TypeDef Make TypeDefTestCase::getInstance() abstract. 2021-02-06 12:31:00 +01:00
parser Tests: use UserIdentityValue instead of mock User objects 2021-05-03 15:41:48 +00:00
password UserPasswordPolicyTest: Replace PasswordCannotMatchBlacklist with PasswordCannotMatchDefaults 2021-04-18 23:52:57 +01:00
Permissions phpunit: Mass-replace setMethods with onlyMethods and adjust 2021-04-16 20:15:00 +02:00
poolcounter ParserCache: only use in-process caching for metadata 2021-04-06 17:53:38 -06:00
preferences DefaultPreferencesFactoryTest: add helper for PermissionManager 2021-05-03 16:24:21 +00:00
rcfeed phpunit: Mass-replace setMethods with onlyMethods and adjust 2021-04-16 20:15:00 +02:00
registration Convert ExtensionJsonValidatorTest to pure unit tests 2021-03-22 16:02:51 +00:00
resourceloader Merge "Create the content-links (and -external) ResourceLoaderSkinModule feature" 2021-04-26 10:26:10 +00:00
Rest Fix order of parameters in assertions 2021-05-03 15:50:53 +00:00
Revision Fix order of parameters in assertions 2021-05-03 15:50:53 +00:00
search Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
session Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
shell Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
site Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
skins Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
sparql
specialpage Fix mismatching type hints in ChangesListSpecialPageTest 2021-05-01 15:39:54 +00:00
specials Merge "Fix mismatching type hints in ChangesListSpecialPageTest" 2021-05-02 07:36:14 +00:00
Storage Start removing places using Revision objects 2021-04-30 12:33:15 -07:00
title NamespaceInfoTest: remove outdated comment about globals 2021-04-23 23:07:11 +00:00
upload
user Expand functionality of MediaWikiTitleCodec in MockTitleTrait 2021-05-03 20:33:36 +00:00
utils Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
watcheditem Convert WatchedItem et al to PageIdentity 2021-03-26 15:51:19 -04:00
ActorMigrationTest.php Remove $actor field from UsererIdentityValue 2021-04-13 18:18:06 +00:00
ActorMigrationTest.sql
AutoLoaderTest.php Add script for resolving class names to files 2021-04-16 11:04:39 +00:00
CategoryTest.php Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
CommentStoreCommentTest.php
CommentStoreTest.php build: Upgrade mediawiki-codesniffer from v35.0.0 to v36.0.0 2021-04-29 13:00:15 -07:00
CommentStoreTest.sql
ContentSecurityPolicyTest.php build: Swap deprecated @codingStandardsIgnore to phpcs:ignore 2021-04-04 21:18:22 +02:00
EditPageConstraintsTest.php Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
EditPageTest.php Remove hooks that use Revision objects 2021-04-30 17:28:20 +00:00
ExportTest.php
ExtraParserTest.php Parser: Trim trailing whitespace as the last step in pre-save transform 2021-04-14 20:53:49 +02:00
FauxRequestTest.php
GitInfoTest.php
HooksTest.php Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
HtmlTest.php
LinkerTest.php Restore userlink for IP range. 2021-02-11 15:32:36 +01:00
LinkFilterTest.php
MagicWordFactoryTest.php
MediaWikiServicesTest.php Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
MediaWikiTest.php Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
MediaWikiVersionFetcherTest.php
MergeHistoryTest.php Fix order of parameters in assertions 2021-05-03 15:50:53 +00:00
MessageTest.php Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
MockServiceWiring.php
MovePageTest.php Factor out rollback logic from WikiPage 2021-04-14 11:49:07 -07:00
MultiHttpClientTest.php Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
MWTimestampTest.php build: Upgrade mediawiki-codesniffer from v35.0.0 to v36.0.0 2021-04-29 13:00:15 -07:00
OutputPageTest.php build: Upgrade mediawiki-codesniffer from v35.0.0 to v36.0.0 2021-04-29 13:00:15 -07:00
PagePropsTest.php Simplify PagePropsTest 2021-05-03 14:42:27 +00:00
ReadOnlyModeTest.php Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
RevisionDbTest.php Start removing places using Revision objects 2021-04-30 12:33:15 -07:00
RevisionTest.php Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
RevisionTestModifyableContent.php
RevisionTestModifyableContentHandler.php
SampleTest.php
SiteStatsTest.php
StatusTest.php phpunit: Mass-replace setMethods with onlyMethods and adjust 2021-04-16 20:15:00 +02:00
TemplateCategoriesTest.php
TestUser.php Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
TestUserRegistry.php
TimeAdjustTest.php
TitleMethodsTest.php Make Title::compare work with Linktarget and Pagereference as well 2021-05-03 23:04:16 +02:00
TitleTest.php Merge "Hard deprecate Title::isWatchable()" 2021-04-30 18:51:14 +00:00
WebRequestTest.php phpunit: Mass-replace setMethods with onlyMethods and adjust 2021-04-16 20:15:00 +02:00
WikiMapTest.php
XmlTest.php Move Xml::expandAttributes tests to unit tests 2021-03-07 19:27:11 +00:00