diff --git a/tests/Graph/EloquentTest.php b/tests/Graph/EloquentTest.php index d8c75a3..50e90ce 100644 --- a/tests/Graph/EloquentTest.php +++ b/tests/Graph/EloquentTest.php @@ -35,11 +35,9 @@ public function testScopeSubgraphWithMaxDepth() public function testChildren() { + /** @var \Illuminate\Support\Collection $children */ $children = Node::find(1)->children; - /** @var Node $child */ - $child = $children[0]; - $this->assertEquals([2, 3, 4, 5], $children->pluck('id')->all()); $this->assertEquals( [ @@ -50,7 +48,7 @@ public function testChildren() 'value' => '123.456', 'created_at' => $this->getFormattedTestNow() ], - $child->pivot->getAttributes() + $children[0]->pivot->getAttributes() ); } diff --git a/tests/Tree/Models/User.php b/tests/Tree/Models/User.php index 5feadf5..41868cb 100644 --- a/tests/Tree/Models/User.php +++ b/tests/Tree/Models/User.php @@ -63,7 +63,7 @@ public function getCustomPaths(): array } /** - * @return HasOneDeep + * @return HasOneDeep */ public function ancestorPost(): HasOneDeep {