From 5dd4765552908daee362c82b0f7f614e827e0135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 21 Feb 2023 13:38:46 +0100 Subject: [PATCH] Fixed tests --- tests/Resources/TestCase/ExtendedTestCaseMethodsTrait.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Resources/TestCase/ExtendedTestCaseMethodsTrait.php b/tests/Resources/TestCase/ExtendedTestCaseMethodsTrait.php index 6f0aaa56b2fe9..7b84457f6a36f 100644 --- a/tests/Resources/TestCase/ExtendedTestCaseMethodsTrait.php +++ b/tests/Resources/TestCase/ExtendedTestCaseMethodsTrait.php @@ -20,19 +20,19 @@ private function compareWithEpsilon($expected, $actual) public function assertEqualsWithEpsilon($expected, $actual, $message = '') { if (!is_array($expected)) { - $expectedArray[] = $expected; + $expectedArray[]['a'] = $expected; // we recreate the structure of the array as in Tools::spreadAmount() } else { $expectedArray = $expected; } if (!is_array($actual)) { - $actualArray[] = $actual; + $actualArray[]['a'] = $actual; // we recreate the structure of the array as in Tools::spreadAmount() } else { $actualArray = $actual; } foreach ($expectedArray as $key => $item) { - $this->compareWithEpsilon($item, $actualArray[$key]); + $this->compareWithEpsilon($item['a'], $actualArray[$key]['a']); } } }