Skip to content

Commit

Permalink
staudenmeir#259: Updated to use display path
Browse files Browse the repository at this point in the history
  • Loading branch information
tylernathanreed authored Sep 6, 2024
1 parent 5ab4447 commit f3d30bb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/Tree/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ public function testLoadTreePathRelations()
->tree()
->get()
->loadTreePathRelations()
->each(fn ($s) => $s->setAppends(['slug_path', 'reverse_slug_path']))
->each(fn ($s) => $s->setAppends(['display_path', 'reverse_display_path']))
->toTree();

$this->assertLessThanOrEqual($limit, $loaded);

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

Check failure on line 61 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
$this->assertEquals('user-11', $tree[1]->display_path);

Check failure on line 62 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
$this->assertEquals('user-1 > user-2', $tree[0]->children[0]->display_path);

Check failure on line 63 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
$this->assertEquals('user-1 > user-3', $tree[0]->children[1]->display_path);

Check failure on line 64 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
$this->assertEquals('user-1 > user-4', $tree[0]->children[2]->display_path);

Check failure on line 65 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
$this->assertEquals('user-1 > user-2 > user-5', $tree[0]->children[0]->children[0]->display_path);

Check failure on line 66 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
$this->assertEquals('user-1 > user-2 > user-5 > user-8', $tree[0]->children[0]->children[0]->children[0]->display_path);

Check failure on line 67 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
$this->assertEquals('user-11 > user-12', $tree[1]->children[0]->display_path);

Check failure on line 68 in tests/Tree/CollectionTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3, stable)

Access to an undefined property Staudenmeir\LaravelAdjacencyList\Tests\Tree\Models\User::$display_path.
}
}

0 comments on commit f3d30bb

Please sign in to comment.