@@ 152-162 (lines=11) @@ | ||
149 | $this->assertEquals(true, $node->isRelationPopulated('children')); |
|
150 | } |
|
151 | ||
152 | public function testIsRoot() |
|
153 | { |
|
154 | $this->assertTrue(Node::findOne(1)->isRoot()); |
|
155 | $this->assertFalse(Node::findOne(3)->isRoot()); |
|
156 | ||
157 | $this->assertTrue(AttributeModeNode::findOne(1)->isRoot()); |
|
158 | $this->assertFalse(AttributeModeNode::findOne(3)->isRoot()); |
|
159 | ||
160 | $this->assertTrue(MultipleTreeNode::findOne(1)->isRoot()); |
|
161 | $this->assertFalse(MultipleTreeNode::findOne(3)->isRoot()); |
|
162 | } |
|
163 | ||
164 | public function testIsChildOf() |
|
165 | { |
|
@@ 188-198 (lines=11) @@ | ||
185 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(16))); |
|
186 | } |
|
187 | ||
188 | public function testIsLeaf() |
|
189 | { |
|
190 | $this->assertTrue(Node::findOne(5)->isLeaf()); |
|
191 | $this->assertFalse(Node::findOne(2)->isLeaf()); |
|
192 | ||
193 | $this->assertTrue(AttributeModeNode::findOne(5)->isLeaf()); |
|
194 | $this->assertFalse(AttributeModeNode::findOne(2)->isLeaf()); |
|
195 | ||
196 | $this->assertTrue(MultipleTreeNode::findOne(5)->isLeaf()); |
|
197 | $this->assertFalse(MultipleTreeNode::findOne(2)->isLeaf()); |
|
198 | } |
|
199 | ||
200 | public function testMakeRootInsert() |
|
201 | { |