Commit graph

9 commits

Author SHA1 Message Date
Andrew Nicols
3b1118cfd4
MDL-83468 phpunit: assertEqualsCanonicalizing now compares keys too
In previous versions of PHPUnit, the `assertEqualsCanonicalizing()`
method compared values only, ignoring the keys entirely. Since PHPUnit
10 the method now checks keys where they are non-numeric.

To solve this we call `array_values()`.
2025-01-20 16:47:56 +01:00
Andrew Nicols
c2414e5a45
MDL-81520 core: Fix test finality 2024-12-11 12:30:23 +08:00
Simon Adams
a0cf3d2da5 MDL-71378 core_question & mod_quiz: Refactor deprecated contexts 2024-11-18 10:22:59 +00:00
Simon Adams
966b264cf3 MDL-71378 mod_qbank: Add question bank backup/restore and refactor tests 2024-11-15 15:18:47 +00:00
Eloy Lafuente (stronk7)
01148a0816
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 11:55:07 +02:00
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Safat Shahin
111951d861 MDL-71696 mod_quiz: quiz updates and behat coverage
The versioning changes will require some major changes
in the backup and restore of question bank and its
elements. This change introduces those changes to make
it compatible with the new world of versioning in question
bank. This commit also removes quiz_slots fields and
quiz_slot_tags table.
This commit will also introduce the versioning db
structure and some major changes to the quiz
and quiz attempts for the question, random
question and the view.
This commit implements the behat changes for versioning
in core question and associated locations.
2022-02-03 22:22:44 +11:00
Guillermo Gomez
c6cfca2a08 MDL-71696 core_question: Changes for versioning
This commit adds the changes in questiontype base
to work with new question tables and the new structure in the
databse. Also needed for versioning.
This implementation will also introduct the question status
which allows a question to be in draft and ready status.
I also introduces changes to the base view where it shows
the latest version of the questions. The view of versions
for a question is not implemented in this commit.
This implementation will also introduce changes in the core
qtype plugins to support versioning and the changed
db schema.
2022-02-03 22:22:44 +11:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00