File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -609,8 +609,13 @@ public function testCreatesTree()
609
609
]);
610
610
611
611
$ this ->assertTreeNotBroken ();
612
+
612
613
$ this ->assertTrue (isset ($ node ->children ));
614
+
615
+ $ node = $ this ->findCategory ('test ' );
616
+
613
617
$ this ->assertCount (2 , $ node ->children );
618
+ $ this ->assertEquals ('test2 ' , $ node ->children [0 ]->name );
614
619
}
615
620
616
621
public function testDescendantsOfNonExistingNode ()
@@ -761,7 +766,9 @@ public function testRebuildTree()
761
766
[
762
767
'id ' => 1 ,
763
768
'children ' => [
769
+ [ 'id ' => 10 ],
764
770
[ 'id ' => 3 , 'name ' => 'apple v2 ' , 'children ' => [ [ 'name ' => 'new node ' ] ] ],
771
+ [ 'id ' => 2 ],
765
772
766
773
]
767
774
]
@@ -774,6 +781,7 @@ public function testRebuildTree()
774
781
775
782
$ this ->assertEquals (1 , $ node ->getParentId ());
776
783
$ this ->assertEquals ('apple v2 ' , $ node ->name );
784
+ $ this ->assertEquals (4 , $ node ->getLft ());
777
785
778
786
$ node = $ this ->findCategory ('new node ' );
779
787
You can’t perform that action at this time.
0 commit comments