MDL-75757 phpunit: Add some tolerance to a few failing assertions
commit6be384ee8fc616fa8f9b4c17334c540d1df19f26
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sat, 17 Sep 2022 17:53:13 +0000 (17 19:53 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 18 Sep 2022 13:55:36 +0000 (18 15:55 +0200)
treeb4551068f5ed9113db74f35d64451b45ba987662
parentb077af7e890252ae5fa4e70c2ce6b59fa484c237
MDL-75757 phpunit: Add some tolerance to a few failing assertions

Recently, PHPUnit (all versions) did some changes about how the
comparators worked and this has caused some float comparisons
to stop working.

We need to move them to assertEqualsWithDelta(), allowing a small
tolerance to workaround the floats comparison problem.

0.00001 has been decided. And applied to all the similar assertions
within the unittest function, so if more cases are added to them
better be copied with the agreed tolerance.
question/behaviour/deferredcbm/tests/behaviour_type_test.php
question/engine/tests/helpers.php
question/type/multianswer/tests/question_test.php