moodle/question/type
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
..
calculated MDL-67673 phpunit: Remove expectedException annotations 2020-10-21 12:46:05 +02:00
calculatedmulti MDL-68973 versions: bump all versions and requires near release 2020-06-09 16:23:09 +02:00
calculatedsimple MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
ddimageortext MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
ddmarker MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
ddwtos MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
description MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
essay MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
gapselect MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
match MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
missingtype MDL-67673 phpunit: Remove expectedException annotations 2020-10-21 12:46:05 +02:00
multianswer MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
multichoice MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
numerical MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
random MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
randomsamatch MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:08:09 +02:00
shortanswer MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
tests MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:46:04 +02:00
truefalse MDL-67673 phpunit: Remove deprecated non-public attribute assertions 2020-10-21 12:46:05 +02:00
edit_question_form.php MDL-53140 core_question: Support localised floats when editing questions 2019-05-01 12:10:32 +10:00
questionbase.php MDL-65296 questions: field should be declared 2019-04-08 12:19:13 +01:00
questiontypebase.php Merge branch 'MDL-63812' of https://github.com/timhunt/moodle 2020-05-25 14:40:14 +08:00
rendererbase.php
tags_form.php MDL-61837 core_question: replace tag fields on tag modal 2018-04-09 11:46:46 +08:00
upgrade.txt MDL-67153 question bank: let qtype add actions to the edit menu 2019-11-06 19:32:15 +00:00