Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Oct 6, 2024
1 parent 531b6e8 commit 5f98c34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Tree/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function testLoadTreePathRelations(): void
$this->assertTrue($user->relationLoaded('ancestorsAndSelf'));
$this->assertTrue($user->relationLoaded('parent'));

$this->assertEquals($user->ancestors()->pluck('id')->all(), $user->ancestors->pluck('id')->all());
$this->assertEquals($user->ancestorsAndSelf()->pluck('id')->all(), $user->ancestorsAndSelf->pluck('id')->all());
$this->assertEquals($user->ancestors()->orderByDesc('depth')->pluck('id')->all(), $user->ancestors->pluck('id')->all());
$this->assertEquals($user->ancestorsAndSelf()->orderByDesc('depth')->pluck('id')->all(), $user->ancestorsAndSelf->pluck('id')->all());
$this->assertEquals($user->parent()->first()?->id, $user->parent?->id);
}
}
Expand All @@ -72,8 +72,8 @@ public function testLoadTreePathRelationsWithMissingModels(): void
$this->assertTrue($user->relationLoaded('ancestorsAndSelf'));
$this->assertTrue($user->relationLoaded('parent'));

$this->assertEquals($user->ancestors()->pluck('id')->all(), $user->ancestors->pluck('id')->all());
$this->assertEquals($user->ancestorsAndSelf()->pluck('id')->all(), $user->ancestorsAndSelf->pluck('id')->all());
$this->assertEquals($user->ancestors()->orderByDesc('depth')->pluck('id')->all(), $user->ancestors->pluck('id')->all());
$this->assertEquals($user->ancestorsAndSelf()->orderByDesc('depth')->pluck('id')->all(), $user->ancestorsAndSelf->pluck('id')->all());
$this->assertEquals($user->parent()->first()?->id, $user->parent?->id);
}
}
Expand Down

0 comments on commit 5f98c34

Please sign in to comment.