@@ 150-157 (lines=8) @@ | ||
147 | $this->assertEquals(true, $node->isRelationPopulated('children')); |
|
148 | } |
|
149 | ||
150 | public function testIsRoot() |
|
151 | { |
|
152 | $this->assertTrue(Node::findOne(41)->isRoot()); |
|
153 | $this->assertTrue(NodeJoin::findOne(41)->isRoot()); |
|
154 | ||
155 | $this->assertFalse(Node::findOne(21)->isRoot()); |
|
156 | $this->assertFalse(NodeJoin::findOne(21)->isRoot()); |
|
157 | } |
|
158 | ||
159 | public function testIsChildOf() |
|
160 | { |
|
@@ 180-187 (lines=8) @@ | ||
177 | $this->assertFalse(NodeJoin::findOne(10)->isChildOf(Node::findOne(43))); |
|
178 | } |
|
179 | ||
180 | public function testIsLeaf() |
|
181 | { |
|
182 | $this->assertTrue(Node::findOne(22)->isLeaf()); |
|
183 | $this->assertTrue(NodeJoin::findOne(22)->isLeaf()); |
|
184 | ||
185 | $this->assertFalse(Node::findOne(45)->isLeaf()); |
|
186 | $this->assertFalse(NodeJoin::findOne(45)->isLeaf()); |
|
187 | } |
|
188 | ||
189 | public function testGetParentsIds() |
|
190 | { |