moodle/question/tests
Daniel Ziegenberg 08027e408c
MDL-81281 phpunit: assertObjectHasAttribute is deprecated
To be integrated as part of MDL-81266

When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectHasProperty() instead."

So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.

PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit.  PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-03-25 16:21:45 +01:00
..
behat MDL-71733 behat: final removal of deprecated 400 step definitions. 2024-01-04 12:43:52 +00:00
event MDL-71696 core_question: class autoload changes 2022-02-03 22:22:50 +11:00
fixtures MDL-71636 core_question : API changes for column_base 2022-03-02 08:14:48 +00:00
generator MDL-78547 quiz: in a preview, if a question has been edited, update it 2024-03-07 16:14:47 +00:00
local MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
privacy MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
backup_test.php MDL-76870 question: change assertion to assertEqualsCanonicalizing 2023-01-13 18:12:48 +08:00
calculated_question_summary_test.php MDL-77626 quiz statistics: Divide by zero if a random Q has max mark 0 2023-03-14 16:29:12 +00:00
coverage.php MDL-76362 question: Refactor question number unit tests 2023-01-23 09:15:54 +08:00
externallib_test.php MDL-81281 phpunit: assertObjectHasAttribute is deprecated 2024-03-25 16:21:45 +01:00
generator_test.php MDL-71696 core_question: Changes for versioning 2022-02-03 22:22:44 +11:00
importexport_test.php MDL-75777 phpunit: Move tests to use correct names and ns (take#6) 2022-09-19 11:01:21 +02:00
least_used_variant_strategy_test.php MDL-75777 phpunit: Move tests to use correct names and ns (take#6) 2022-09-19 11:01:21 +02:00
privacy_helper.php MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
question_bank_column_test.php MDL-75777 phpunit: Move tests to use correct names and ns (take#6) 2022-09-19 11:01:21 +02:00
random_question_loader_test.php MDL-72321 mod_quiz: Use new datafilters for random questions 2023-08-31 15:00:39 +01:00
version_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00