Skip to content

Commit

Permalink
staudenmeir#259: Sort results to ensure consistency across database p…
Browse files Browse the repository at this point in the history
…latforms
  • Loading branch information
tylernathanreed authored Sep 6, 2024
1 parent 386c156 commit 33d19db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Tree/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public function testLoadTreePathRelations()

$this->assertEquals('user-1', $tree[0]->display_path);
$this->assertEquals('user-11', $tree[1]->display_path);
$this->assertEquals('user-1 > user-2', $tree[0]->children[0]->display_path);
$this->assertEquals('user-1 > user-3', $tree[0]->children[1]->display_path);
$this->assertEquals('user-1 > user-4', $tree[0]->children[2]->display_path);
$this->assertEquals('user-1 > user-2 > user-5', $tree[0]->children[0]->children[0]->display_path);
$this->assertEquals('user-1 > user-2 > user-5 > user-8', $tree[0]->children[0]->children[0]->children[0]->display_path);
$this->assertEquals('user-1 > user-2', $tree[0]->children->sortBy('id')[0]->display_path);
$this->assertEquals('user-1 > user-3', $tree[0]->children->sortBy('id')[1]->display_path);
$this->assertEquals('user-1 > user-4', $tree[0]->children->sortBy('id')[2]->display_path);
$this->assertEquals('user-1 > user-2 > user-5', $tree[0]->children->sortBy('id')[0]->children[0]->display_path);
$this->assertEquals('user-1 > user-2 > user-5 > user-8', $tree[0]->children->sortBy('id')[0]->children[0]->children[0]->display_path);
$this->assertEquals('user-11 > user-12', $tree[1]->children[0]->display_path);
}
}

0 comments on commit 33d19db

Please sign in to comment.