Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lazychaser committed Feb 28, 2016
1 parent 26fc2c3 commit 7575370
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/NodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,13 @@ public function testCreatesTree()
]);

$this->assertTreeNotBroken();

$this->assertTrue(isset($node->children));

$node = $this->findCategory('test');

$this->assertCount(2, $node->children);
$this->assertEquals('test2', $node->children[0]->name);
}

public function testDescendantsOfNonExistingNode()
Expand Down Expand Up @@ -761,7 +766,9 @@ public function testRebuildTree()
[
'id' => 1,
'children' => [
[ 'id' => 10 ],
[ 'id' => 3, 'name' => 'apple v2', 'children' => [ [ 'name' => 'new node' ] ] ],
[ 'id' => 2 ],

]
]
Expand All @@ -774,6 +781,7 @@ public function testRebuildTree()

$this->assertEquals(1, $node->getParentId());
$this->assertEquals('apple v2', $node->name);
$this->assertEquals(4, $node->getLft());

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

Expand Down

0 comments on commit 7575370

Please sign in to comment.