wiki.techinc.nl/tests/phpunit/includes/block
Thalia 9335363789
Store block reasons as CommentStoreComments in block classes
AbstractBlock::setReason now accepts a string, Message or
CommentStoreComment. The CommentStoreComment is accessed via
AbstractBlock::getReasonComment.

AbstractBlock::getReason returns the reason as a string, with
the language and format consistent with how block reasons were
built before this commit. This method is deprecated, since it
makes assumptions about the language and format needed. The
deprecated mReason property is no longer public.

Doing this (and T227005) will remove the implicit dependency of
BlockManager::getUserBlock on language, which causes a recursion
error if the block is checked before the user has loaded. It also
provides a mechanism for getting the block reason in a language
specified by the caller. (This does not apply to DatabaseBlock
reasons entered via the Special:Block form, which were not and
are still not translatable.)

This commit also updates authentication classes to return the
translated reason.

Bug: T227007
Change-Id: Iec36876e930dff96a256aebbdc39cbfb331c244e
2019-10-18 17:47:56 -04:00
..
Restriction Replace lowercase {@inheritdoc} with @inheritDoc 2019-03-01 17:25:02 +00:00
BlockErrorFormatterTest.php Store block reasons as CommentStoreComments in block classes 2019-10-18 17:47:56 -04:00
BlockManagerTest.php Clear block cookie when tracking block, not when checking block 2019-10-09 14:09:34 +01:00
BlockRestrictionStoreTest.php tests: Prefer assertSame() when comparing the integer 0 2019-09-19 15:35:23 +00:00
CompositeBlockTest.php Introduce a formatter service for block errors 2019-10-08 12:29:23 +01:00
DatabaseBlockTest.php Store block reasons as CommentStoreComments in block classes 2019-10-18 17:47:56 -04:00