moodle/message
Eloy Lafuente (stronk7) 106c64ac24 MDL-67673 phpunit: Remove deprecated non-public attribute assertions
With PHPUnit 8 a good number of assertions, all them related with
operations on non-public attributes have been deprecated. And will
be removed with PHPUnit 9.

The main point is that unit tests shouldn't be testing non-public
APIs (good practice) and those assertions were an error originally.

See https://github.com/sebastianbergmann/phpunit/issues/3338 for
the complete list and other details.

When possible (the attributes being checked are public), the change
is simple, just switching to normal assertions.

When the attributes are not public we need to find a workaround
to be able to test the same using public APIs, or use Reflection,
or remove the tests.

For the records, this is the regexp used to find all the cases:

ag '>(assertAttribute|attribute\(|readAttributte|getStaticAttribute| \
    getObjectAttribute)' -G "test.php"
2020-10-21 12:46:05 +02:00
..
amd MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:09:07 +08:00
classes MDL-68070 messaging: Fix error when personal notification is disabled 2020-10-13 23:40:46 +02:00
output MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
templates MDL-69454 core_search: message search 2020-09-23 17:36:14 +02:00
tests MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
defaultoutputs.php MDL-69521 core: Move all comments in code from 4.1 to 3.11 2020-09-08 19:01:36 +02:00
edit.php MDL-63303 message: message/edit.php opens setttings in message drawer 2018-11-15 14:43:21 +08:00
externallib.php MDL-68070 messaging: Ensure that error is shown on first messages 2020-10-14 18:57:29 +02:00
index.php Merge branch 'MDL-65093_master-deprecate' of git://github.com/markn86/moodle 2019-07-29 10:43:52 +08:00
lib.php MDL-69050 lang: Improve the wording of the comments 2020-09-24 19:32:40 +02:00
module.js
notificationpreferences.php
pendingcontactrequests.php MDL-65219 message: add message/pendingcontactrequests.php page back 2019-07-23 11:37:55 +08:00
renderer.php MDL-66968 php74: array_key_exists() for objects is deprecated 2019-10-25 00:49:04 +02:00
upgrade.txt MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:09:07 +08:00