MDL-67673 phpunit: Remove deprecated assertEquals() params

The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
This commit is contained in:
Eloy Lafuente (stronk7)
2020-10-21 12:46:05 +02:00
parent 35bc26b516
commit 46606b3ddd
70 changed files with 220 additions and 263 deletions
@@ -112,7 +112,7 @@ class question_attempt_step_test extends advanced_testcase {
public function test_constructor_default_params() {
global $USER;
$step = new question_attempt_step();
$this->assertEquals(time(), $step->get_timecreated(), '', 5);
$this->assertEquals(time(), $step->get_timecreated(), 5);
$this->assertEquals($USER->id, $step->get_user_id());
$this->assertEquals(array(), $step->get_qt_data());
$this->assertEquals(array(), $step->get_behaviour_data());