Commit graph

4 commits

Author SHA1 Message Date
Fomafix 829003cabf Use $this->getServiceContainer() in maintenance and tests
Use
	$this->getServiceContainer()
instead of
	MediaWikiServices::getInstance()
in maintenance and tests.

Change-Id: I845e8f083b19da093166d6551683f2013eec7bb1
2023-11-09 20:18:48 +00:00
Daimona Eaytoy 713f60aaa5 Avoid DB access in non-Database tests
Use mocks when possible, and add the test to the Database group
otherwise.

Also rename 2 test files to avoid a PHPUnit deprecation of file name not
matching class name.

Change-Id: I16b2392daf01f63511c82b4ed0e67a38e35ddbe1
2023-08-04 02:31:24 +02:00
Umherirrender 680e91c75c tests: Make PHPUnit data providers static
Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: I8b6fbfc300d62a10da770c8a1ca61756c7d7bf59
2023-05-20 20:36:33 +02:00
Dreamy Jazz 62c9c01dde Test ServiceWiring.php
Test ServiceWiring.php using tests copied from CentralAuth. Because
phpunit does not support marking a file as covered, the ServiceWiring
file is ignored for code coverage as the tests should partly cover
the file.

Change-Id: I3ea5ae553d17e17680fcac4d92746fc7ce282eaa
2023-01-25 03:56:06 +00:00