moodle/grade
Eloy Lafuente (stronk7) 8a14a7bd22 MDL-71036 phpunit: assertContains() now performs strict comparison
The methods assertContains() and assertNotContains() now perform
strict (type and value) comparison, pretty much like assertSame()
does.

A couple of new assertContainsEquals() and assertNotContainsEquals()
methods have been created to provide old (non-strict) behavior, pretty
much like assertEquals() do.

Apart from replacing the calls needing a relaxed comparison to those
new methods, there are also a couple of alternative, about how to
fix this, depending of every case:

- If the test is making any array_values() conversion, then it's better
  to remove that conversion and use assertArrayHasKey(), that is not
  strict.
- Sometimes if may be also possible to, simply, cast the expectation
  to the exact type coming in the array. I've not applied this technique
  to any of the cases in core.

Link: https://github.com/sebastianbergmann/phpunit/issues/3426
2021-03-11 23:04:31 +01:00
..
amd MDL-65948 core_grade: Use new core/checkbox-toggleall 2019-12-30 14:13:35 +08:00
classes MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 17:14:33 +01:00
edit MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:23:51 +08:00
export MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
grading MDL-71036 phpunit: assertContains() now performs strict comparison 2021-03-11 23:04:31 +01:00
import MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
report MDL-45242 Course: Enrol feature supports custom profile fields 2021-03-10 10:57:11 +00:00
templates MDL-65948 core_grade: Use new core/checkbox-toggleall 2019-12-30 14:13:35 +08:00
tests MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:23:51 +08:00
index.php
lib.php MDL-68343 gradereport_singleview: fix empty links 2020-04-22 04:30:53 +10:00
querylib.php MDL-63422 general: review core loop / switch / case / continue 2018-10-31 00:17:59 +01:00
upgrade.txt Merge branch 'MDL-65044-master' of git://github.com/lameze/moodle 2019-03-27 22:47:30 +01:00