@@ 164-171 (lines=8) @@ | ||
161 | $this->assertEquals([], $node->children); |
|
162 | } |
|
163 | ||
164 | public function testIsRoot() |
|
165 | { |
|
166 | $this->assertTrue(Node::findOne(41)->isRoot()); |
|
167 | $this->assertTrue(NodeJoin::findOne(41)->isRoot()); |
|
168 | ||
169 | $this->assertFalse(Node::findOne(21)->isRoot()); |
|
170 | $this->assertFalse(NodeJoin::findOne(21)->isRoot()); |
|
171 | } |
|
172 | ||
173 | public function testIsChildOf() |
|
174 | { |
|
@@ 194-201 (lines=8) @@ | ||
191 | $this->assertFalse(NodeJoin::findOne(10)->isChildOf(Node::findOne(43))); |
|
192 | } |
|
193 | ||
194 | public function testIsLeaf() |
|
195 | { |
|
196 | $this->assertTrue(Node::findOne(22)->isLeaf()); |
|
197 | $this->assertTrue(NodeJoin::findOne(22)->isLeaf()); |
|
198 | ||
199 | $this->assertFalse(Node::findOne(45)->isLeaf()); |
|
200 | $this->assertFalse(NodeJoin::findOne(45)->isLeaf()); |
|
201 | } |
|
202 | ||
203 | public function testGetParentsIds() |
|
204 | { |