moodle/badges
Eloy Lafuente (stronk7) a293b3aea8 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:00 +02:00
..
amd MDL-68567 badges: add/remove site backpacks 2020-05-22 09:01:59 +02:00
classes Merge branch 'MDL-69055-master' of git://github.com/sarjona/moodle 2020-08-20 12:00:51 +08:00
criteria MDL-63387 course: use renamed role names, update Behat tests. 2020-09-01 12:05:20 +01:00
lib MDL-49103 badges: bake badges with iTXt chunk instead of tEXt 2020-02-04 18:49:39 +01:00
templates MDL-69054 core_badges: allow editing OBv1.0 backpacks 2020-08-14 17:09:10 +02:00
tests MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:00 +02:00
action.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
ajax.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
alignment.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
alignment_action.php MDL-63876 badges: Remove invalid table from badges 2019-03-29 11:30:09 +08:00
alignment_form.php MDL-63876 badges: Remove invalid table from badges 2019-03-29 11:30:09 +08:00
assertion.php MDL-67451 badges: use the site OB version as default 2019-12-04 21:01:09 +01:00
award.php MDL-62836 badges: Potential badge recipients by group 2019-07-12 18:13:37 +02:00
backpack-add.php MDL-63262 badges: More changes for badgr.io 2019-05-03 15:00:01 +08:00
backpack-connect.php MDL-66992 core_badges: Add support to Open Badges 2.1 2020-05-17 20:01:55 +07:00
backpack-export.php MDL-66992 core_badges: Add support to Open Badges 2.1 2020-05-17 20:01:55 +07:00
backpack.js MDL-63262 badges: More changes for badgr.io 2019-05-03 15:00:01 +08:00
backpackemailverify.php MDL-63262 badges: More changes for badgr.io 2019-05-03 15:00:01 +08:00
backpacks.php MDL-69002 core_badges: move backpack validation to a separate page 2020-06-10 13:02:44 +02:00
badge.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
badge_json.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
criteria.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
criteria_action.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
criteria_form.php MDL-63876 badges: Coding style 2019-03-29 11:31:15 +08:00
criteria_settings.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
edit.php MDL-68905 core_badges: remove issuer details from edit page 2020-06-03 19:38:09 +02:00
endorsement.php MDL-63991 badges: Translate notification on endorsement 2018-11-13 15:58:47 +01:00
endorsement_form.php MDL-64010 badges: Validate URL form fields. 2018-11-16 10:28:09 +08:00
endorsement_json.php MDL-58454 badges: Open Badges Specification Version 2.0 Changes 2018-11-05 14:20:46 +01:00
external.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
image_author_json.php MDL-58454 badges: Open Badges Specification Version 2.0 Changes 2018-11-05 14:20:46 +01:00
index.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
issuer_json.php MDL-66357 core_badges: remove action=0 usage for issuer 2020-04-03 08:09:55 +02:00
lib.php MDL-53589 badges: fix capability check 2016-05-06 09:27:24 +08:00
mybackpack.php MDL-66992 core_badges: Add support to Open Badges 2.1 2020-05-17 20:01:55 +07:00
mybadges.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
newbadge.php MDL-68746 core_badges: remove Issuer details from badges form 2020-05-20 08:51:52 +02:00
oauth2callback.php MDL-66992 core_badges: Add support to Open Badges 2.1 2020-05-17 20:01:55 +07:00
overview.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
preferences.php MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:04:47 +00:00
preferences_form.php
recipients.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
related.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00
related_action.php MDL-58454 badges: Fix some minor errors for Open Badges v2 2018-11-05 18:41:54 +01:00
related_form.php MDL-63973 core_badges: exclude related badges when adding related badges 2018-11-19 11:19:12 +08:00
renderer.php MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00:00
upgrade.txt MDL-66357 core_badges: set OBv2 as default 2020-04-03 08:09:55 +02:00
upgradelib.php MDL-66357 core_badges: remove mozilla backpack references 2020-04-03 08:09:55 +02:00
view.php MDL-63262 badges: Add badgr.io 2019-05-03 15:00:00 +08:00