Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Aug 27, 2024
1 parent 2b39ec9 commit 45b29e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions tests/Graph/EloquentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ public function testScopeSubgraphWithMaxDepth()

public function testChildren()
{
/** @var \Illuminate\Support\Collection<Node> $children */
$children = Node::find(1)->children;

/** @var Node $child */
$child = $children[0];

$this->assertEquals([2, 3, 4, 5], $children->pluck('id')->all());
$this->assertEquals(
[
Expand All @@ -50,7 +48,7 @@ public function testChildren()
'value' => '123.456',
'created_at' => $this->getFormattedTestNow()
],
$child->pivot->getAttributes()
$children[0]->pivot->getAttributes()
);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Tree/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getCustomPaths(): array
}

/**
* @return HasOneDeep<User>
* @return HasOneDeep<Post>
*/
public function ancestorPost(): HasOneDeep
{
Expand Down

0 comments on commit 45b29e6

Please sign in to comment.