Skip to content

Commit 7575370

Browse files
committed
Updated tests
1 parent 26fc2c3 commit 7575370

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/NodeTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,13 @@ public function testCreatesTree()
609609
]);
610610

611611
$this->assertTreeNotBroken();
612+
612613
$this->assertTrue(isset($node->children));
614+
615+
$node = $this->findCategory('test');
616+
613617
$this->assertCount(2, $node->children);
618+
$this->assertEquals('test2', $node->children[0]->name);
614619
}
615620

616621
public function testDescendantsOfNonExistingNode()
@@ -761,7 +766,9 @@ public function testRebuildTree()
761766
[
762767
'id' => 1,
763768
'children' => [
769+
[ 'id' => 10 ],
764770
[ 'id' => 3, 'name' => 'apple v2', 'children' => [ [ 'name' => 'new node' ] ] ],
771+
[ 'id' => 2 ],
765772

766773
]
767774
]
@@ -774,6 +781,7 @@ public function testRebuildTree()
774781

775782
$this->assertEquals(1, $node->getParentId());
776783
$this->assertEquals('apple v2', $node->name);
784+
$this->assertEquals(4, $node->getLft());
777785

778786
$node = $this->findCategory('new node');
779787

0 commit comments

Comments
 (0)