wiki.techinc.nl/tests/phpunit/unit/includes/block
DannyS712 91ac8a717d Add UserNameUtils to DummyServicesTrait, and use it
Allows us to reduce direct mocking in individual tests, or relying
on MediaWikiServices, by having a reusable service instead that
can be used in unit tests.

Make use of it in a few places.

This dummy service is also less coupled to individual tests;
in the rest handler tests, replacing mocks that report that
only a specific string is an ip address with the actual implementation
that accepts other ip address, and in BlockUtilsTest use
an actually invalid user name instead of making the mock
UserNameUtils complain about a perfectly valid name.

Change-Id: Iaa3195002ac4ae7e0c9c58ed57c80c02762d4070
2021-07-27 12:17:06 +00:00
..
AbstractBlockTest.php Hard-deprecate AbstractBlock::getTargetAndType() and getTarget() 2021-06-22 16:59:00 +03:00
BlockActionInfoTest.php Allow partial action blocks to be made via ApiBlock 2021-05-04 17:48:21 +01:00
BlockPermissionCheckerTest.php Authority: expose user block info 2021-06-30 13:42:21 +02:00
BlockUtilsTest.php Add UserNameUtils to DummyServicesTrait, and use it 2021-07-27 12:17:06 +00:00
SystemBlockTest.php AbstractBlock::setTarget() don't always use MediaWikiServices 2021-03-30 16:24:10 +00:00