moodle/blog
Eloy Lafuente (stronk7) 3dd26fe334 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:07:31 +01:00
..
classes MDL-65584 blog: safer deletion of associations in privacy provider. 2019-10-08 00:12:32 +01:00
tests MDL-71036 phpunit: assertContains() now performs strict comparison 2021-03-11 23:07:31 +01:00
edit.php MDL-36713 Blog: Display accurate error when a guest views a user blog 2016-08-15 21:46:48 -04:00
edit_form.php MDL-50851 blogs: use new tag API 2016-01-10 15:25:47 +08:00
external_blog_edit.php MDL-58635 blogs: check edited blog belongs to current user 2017-05-03 10:49:01 +08:00
external_blog_edit_form.php MDL-56297 forms: Normalize uses of 'url' fields to use size=60 2016-10-31 19:47:41 +01:00
external_blogs.php MDL-45890 Blog: add additional events 2016-09-25 15:06:54 -04:00
index.php MDL-60425 core_blog: Move access validation to API 2018-10-02 14:49:48 +02:00
lib.php MDL-60425 blog: Remove empty line 2018-10-08 12:52:04 +02:00
locallib.php MDL-45242 Lib: Replace calls to deprecated functions 2021-03-10 10:58:09 +00:00
preferences.php MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:04:47 +00:00
preferences_form.php MDL-46346 blog: coding style fixes 2014-07-14 10:45:33 +08:00
renderer.php MDL-50851 blogs: use new tag API 2016-01-10 15:25:47 +08:00
rsslib.php MDL-45242 Lib: Replace calls to deprecated functions 2021-03-10 10:58:09 +00:00
upgrade.txt MDL-64656 core_tag: Return tags in modules and blog 2019-04-11 10:20:44 +02:00