moodle/cohort
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
..
classes MDL-64782 core_cohort: Performance improvement 2019-04-23 17:01:48 +10:00
tests MDL-71036 phpunit: assertContains() now performs strict comparison 2021-03-11 23:04:31 +01:00
assign.php MDL-70578 cohorts: Add bootstrap classes to buttons 2021-01-08 07:28:34 +01:00
edit.php MDL-61238 cohort: require_once all libraries 2018-08-15 00:12:38 +02:00
edit_form.php MDL-67278 course: Use autocomplete widget for course category selector 2020-09-02 15:30:34 +02:00
externallib.php MDL-61601 cohort: Add theme support for cohorts 2018-04-06 08:28:01 +02:00
index.php MDL-69454 core_search: consistent cohort search 2020-09-21 11:54:53 +02:00
lib.php MDL-53566 core: Add support for context locking 2018-11-13 21:17:40 +08:00
locallib.php MDL-44142 Cohorts: Use maxusersperpage for list of current users. 2014-02-13 15:48:40 +00:00
upgrade.txt MDL-52568 core_cohort: added ability to return all cohorts in WS 2016-01-18 11:00:20 +01:00
upload.php MDL-64708 cohort: Return url is not used anywhere in core. 2019-05-08 17:54:44 +02:00
upload_form.php MDL-64708 cohort: Return url is not used anywhere in core. 2019-05-08 17:54:44 +02:00