wiki.techinc.nl/tests/phpunit/unit/includes/Permissions
Bartosz Dziewoński 1fbe8b7619 PermissionManager: Add getPermissionStatus(), deprecate getPermissionErrors()
getPermissionErrors() uses a weird format for its return value that
is slightly different from the usual "legacy error array", and legacy
errors arrays are already icky. Deprecate it without changing this
format, and introduce getPermissionStatus() to replace it. Document
the return format more precisely.

Refactor PermissionManager to use PermissionStatus objects internally,
and only convert to the weird format in the deprecated method.

However, fix a scenario where the error array could directly contain
MessageSpecifier objects or strings instead of nested arrays,
as the documentation said that was not possible. Fix a test case
demonstrating this incorrect behavior.

Change-Id: I6670a58fe1fcb4e1ae87351277e5ddf29c548183
2024-06-26 01:19:37 +02:00
..
GrantsInfoTest.php Permissions: Widen @covers tags in tests 2024-04-11 22:11:56 +01:00
GroupPermissionsLookupTest.php build: Updating mediawiki/mediawiki-codesniffer to 41.0.0 2023-03-11 19:04:09 +00:00
PermissionManagerTest.php PermissionManager: Add getPermissionStatus(), deprecate getPermissionErrors() 2024-06-26 01:19:37 +02:00
PermissionStatusTest.php Make use of assertStatusGood/Error and such in tests 2023-10-04 17:16:00 +00:00
RateLimitSubjectTest.php test: Add PHPUnit tests for RateLimitSubject 2024-02-15 11:17:43 +00:00
RestrictionStoreTest.php Stop using LoadBalancer::getConnectionRef() so it can be hard-deprecated 2024-04-30 13:31:08 +01:00
SimpleAuthorityTest.php Authority::authorizeAction related style tweaks 2023-09-07 17:15:26 +10:00
UltimateAuthorityTest.php Authority::authorizeAction related style tweaks 2023-09-07 17:15:26 +10:00
UserAuthorityTest.php tests: Avoid deprecated Status / StatusValue methods 2024-06-15 10:14:37 +02:00