Skip to content

Commit

Permalink
Support SingleStore
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Nov 30, 2023
1 parent bb96e08 commit d1e8469
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Tree/AncestorsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ class AncestorsTest extends TestCase
{
public function testLazyLoading()
{
$ancestors = User::find(8)->ancestors;
$ancestors = User::find(8)->ancestors()->orderBy('id')->get();

$this->assertEquals([5, 2, 1], $ancestors->pluck('id')->all());
$this->assertEquals([-1, -2, -3], $ancestors->pluck('depth')->all());
$this->assertEquals(['5', '5.2', '5.2.1'], $ancestors->pluck('path')->all());
$this->assertEquals(['user-5', 'user-5/user-2', 'user-5/user-2/user-1'], $ancestors->pluck('slug_path')->all());
$this->assertEquals([1, 2, 5], $ancestors->pluck('id')->all());
$this->assertEquals([-3, -2, -1], $ancestors->pluck('depth')->all());
$this->assertEquals(['5.2.1', '5.2', '5'], $ancestors->pluck('path')->all());
$this->assertEquals(['user-5/user-2/user-1', 'user-5/user-2', 'user-5'], $ancestors->pluck('slug_path')->all());
$this->assertEquals(
['user-5', 'user-2/user-5', 'user-1/user-2/user-5'],
['user-1/user-2/user-5', 'user-2/user-5', 'user-5'],
$ancestors->pluck('reverse_slug_path')->all()
);
}
Expand Down

0 comments on commit d1e8469

Please sign in to comment.