wiki.techinc.nl/tests/phpunit/mocks
Timo Tijhof 50b0aadc6a phpunit: Remove unused trigger_error from TestLogger
It was added in 2016 as part of SessionManager (Ic1ffea74f3, later
re-attributed to Ibb3e023e4e) by Anomie. It wasn't used at the time.

Basically, it is used for cases where we expect no logs, and the
presence of logs will then produce a failing test. The point is to do
something that PHPUnit will "complain" about by showing it. Emitting
a notice or warning is one way, another is to simply echo it, since
output is also unexpected and shown. The somewhat arbitrary mapping
from log levels to PHP error codes isn't used.

Later in 2017, he introduced the same class in php-session-serializer
(I2ebf59414ef9a9) where this part was already removed and replaced
by "echo". The version in core still used trigger_error.

== Why now ==

Triggering E_USER_ERROR is deprecated in PHP 8.4+.

Bug: T379445
Change-Id: Id1e1db80bc8fea39cd192716597e5e4a6f4966b0
(cherry picked from commit 5a1a8c14bd418c846498cd4ed99b77e45a0fcca1)
2025-06-14 10:43:47 +00:00
..
content tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
filebackend tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
filerepo tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
json [JsonCodec] Use wikimedia/json-codec to implement JsonCodec 2024-10-15 20:09:51 -04:00
languages tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
media
permissions Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
poolcounter mocks: Add missing documentation to class properties 2024-09-14 09:55:06 +02:00
search search: Add missing documentation to class properties 2024-09-07 21:56:00 +02:00
session mocks: Add missing documentation to class properties 2024-09-14 09:55:06 +02:00
BrokenClass.php HookContainer: allow registering broken callables. 2023-08-22 16:30:44 +00:00
BrokenClass2.php AutoLoader: Use require_once rather than require 2024-10-24 01:36:18 +00:00
BrokenClass3.php AutoLoader: Use require_once rather than require 2024-10-24 01:36:18 +00:00
DummyServicesTrait.php Make Message and MessageValue compatible 2024-10-19 15:00:07 +02:00
FakeQqxMessageLocalizer.php Make Message and MessageValue compatible 2024-10-19 15:00:07 +02:00
GhostFieldTestClass.php Serialization test cases: fix filename after ParserOutput namespacing 2024-05-17 17:07:47 -04:00
MockBlockTrait.php tests: Make use of ??= and ?? operators in various tests 2024-08-15 11:44:46 +02:00
MockChangesListFilter.php Replace usages of deprecated MWException 2023-06-06 17:05:32 +02:00
MockChangesListFilterGroup.php Migrate to IConnectionProvider methods in more places 2023-10-05 19:51:20 +02:00
MockDatabase.php Add namespace to remaining parts of Wikimedia\ObjectCache 2024-09-27 16:19:10 -04:00
MockEnvironment.php tests: Use namespaced classes (2) 2024-06-13 23:21:02 +02:00
MockHttpTrait.php Make MockHttpTrait::setService() compatible with MediaWikiUnitTestCase 2024-07-29 16:31:41 +02:00
MockMessageLocalizer.php Namespace MessageSpecifier under Wikimedia\Message\ 2024-07-28 14:21:32 +02:00
MockServiceDependenciesTrait.php MockServiceDependenciesTrait: Allow override param to be null 2024-09-27 18:28:33 +02:00
MockTitleTrait.php tests: Use namespaced classes (2) 2024-06-13 23:21:02 +02:00
NullGuzzleClient.php
NullHttpRequestFactory.php
NullMultiHttpClient.php Add namespace and deprecation alias to MultiHttpClient 2024-05-20 00:32:45 +03:30
TestLocalisationCache.php Use variable-length argument lists instead of func_get_args() 2024-08-16 18:42:01 +00:00
TestLogger.php phpunit: Remove unused trigger_error from TestLogger 2025-06-14 10:43:47 +00:00