test: prevent false negatives
Some checks failed
Backend Tests / run (push) Has been cancelled
Frontend Workflow / run (push) Has been cancelled
Static Code Analysis / run (push) Has been cancelled

This commit is contained in:
Sami Mazouz 2024-10-21 19:16:12 +01:00
parent 8219e76da4
commit f97c67e2f9
No known key found for this signature in database

View File

@ -79,7 +79,7 @@ class ListTest extends TestCase
// 6, 7, 8 aren't included because child access shouldnt work unless parent
// access is also given.
$ids = Arr::pluck($data, 'id');
$this->assertEquals(['1', '2', '3', '4', '9', '10', '11'], $ids);
$this->assertEqualsCanonicalizing(['1', '2', '3', '4', '9', '10', '11'], $ids);
}
#[Test]
@ -103,8 +103,8 @@ class ListTest extends TestCase
// 5 isnt included because parent access doesnt necessarily give child access
// 6, 7, 8 aren't included because child access shouldnt work unless parent
// access is also given.
$this->assertEquals(['1', '2', '3', '4', '9', '10', '11'], Arr::pluck($data, 'id'));
$this->assertEquals(
$this->assertEqualsCanonicalizing(['1', '2', '3', '4', '9', '10', '11'], Arr::pluck($data, 'id'));
$this->assertEqualsCanonicalizing(
$expectedIncludes,
collect($data)
->pluck('relationships.'.$include.'.data')