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:00 +02:00
parent 40de097e65
commit 3a5641cb74
70 changed files with 220 additions and 263 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ class core_phpunit_basic_testcase extends basic_testcase {
$this->assertNotEquals($a, $b);
$this->assertNotEquals($a, $d);
$this->assertEquals($a, $c);
$this->assertEquals($a, $b, '', 0, 10, true);
$this->assertEqualsCanonicalizing($a, $b);
// Objects.
$a = new stdClass();