diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php index 0916d8601c..dbbc40f180 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php @@ -110,7 +110,7 @@ public function testConditionSubquerySelect2() { // FROM test t // WHERE t.age < (SELECT AVG(t2.age) FROM test t2) $people = $select->execute()->fetchCol(); - $this->assertEquals(['John', 'Paul'], $people, 'Returned Paul and John.', 0.0, 10, TRUE); + $this->assertEqualsCanonicalizing(['John', 'Paul'], $people, 'Returned Paul and John.'); } /** @@ -136,7 +136,7 @@ public function testConditionSubquerySelect3() { // FROM test t // WHERE (SELECT AVG(tt.priority) FROM test_task tt WHERE tt.pid = t.id) > (SELECT AVG(tt2.priority) FROM test_task tt2) $people = $select->execute()->fetchCol(); - $this->assertEquals(['John'], $people, 'Returned John.', 0.0, 10, TRUE); + $this->assertEqualsCanonicalizing(['John'], $people, 'Returned John.'); } /** @@ -174,7 +174,7 @@ public function testConditionSubquerySelect4() { // BETWEEN (SELECT MIN(tt2.priority) AS expression FROM {test_task} tt2 WHERE (tt2.pid <> t.id)) // AND (SELECT AVG(tt3.priority) AS expression FROM {test_task} tt3 WHERE (tt3.pid <> t.id)); $people = $select->execute()->fetchCol(); - $this->assertEquals(['George', 'Paul'], $people, 'Returned George and Paul.', 0.0, 10, TRUE); + $this->assertEqualsCanonicalizing(['George', 'Paul'], $people, 'Returned George and Paul.'); } /** diff --git a/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php b/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php index 5912ff048c..6dd7c461a5 100644 --- a/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php +++ b/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php @@ -29,7 +29,6 @@ 'assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.', 'readAttribute() is deprecated and will be removed in PHPUnit 9.', 'getObjectAttribute() is deprecated and will be removed in PHPUnit 9.', - 'The optional $canonicalize parameter of assertEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertEqualsCanonicalizing() instead.', 'assertAttributeEquals() is deprecated and will be removed in PHPUnit 9.', 'assertAttributeSame() is deprecated and will be removed in PHPUnit 9.', 'assertAttributeInstanceOf() is deprecated and will be removed in PHPUnit 9.',