Lines Matching refs:tree

92         $tree = $root->getChildren(true);
94 $this->assertCount(2, $tree, '2 root nodes expected');
95 $this->assertEquals('car', $tree[0]->getValueObject()->getValue());
96 $this->assertEquals('laptop', $tree[1]->getValueObject()->getValue());
98 $this->assertCount(0, $tree[0]->getChildren(true), 'no children expected');
99 $this->assertCount(0, $tree[1]->getChildren(true), 'no children expected');
101 $this->assertCount(6, $tree[0]->getResultRows(), 'result rows');
102 $this->assertCount(6, $tree[1]->getResultRows(), 'result rows');
104 $this->assertEquals('a80', $tree[0]->getResultRows()[0][1]->getValue(), 'Audi 80 expected');
105 … $this->assertEquals('pro 16', $tree[1]->getResultRows()[0][1]->getValue(), 'Mac Pro 16 expected');
117 $tree = $root->getChildren(true);
119 $this->assertCount(2, $tree, '2 root nodes expected');
120 $this->assertEquals('car', $tree[0]->getValueObject()->getValue());
121 $this->assertEquals('laptop', $tree[1]->getValueObject()->getValue());
123 $this->assertCount(2, $tree[0]->getChildren(true), '2 car brands expected');
124 $this->assertCount(3, $tree[1]->getChildren(true), '3 laptop brands expected');
126 $this->assertCount(3, $tree[0]->getChildren(true)[0]->getResultRows(), '3 audis expected');
127 $this->assertCount(3, $tree[0]->getChildren(true)[1]->getResultRows(), '3 bmw expected');
128 $this->assertCount(3, $tree[1]->getChildren(true)[0]->getResultRows(), '3 apple expected');
129 $this->assertCount(1, $tree[1]->getChildren(true)[1]->getResultRows(), '1 bmw expected');
130 $this->assertCount(2, $tree[1]->getChildren(true)[2]->getResultRows(), '2 dell expected');
133 …$this->assertEquals('a80', $tree[0]->getChildren(true)[0]->getResultRows()[0][0]->getValue(), 'Aud…
134 …$this->assertEquals('pro 16', $tree[1]->getChildren(true)[0]->getResultRows()[0][0]->getValue(), '…
145 $tree = $root->getChildren(true); // nest: color, type, brand -> model
147 $this->assertCount(6, $tree, '6 root nodes of colors expected');
150 $this->assertEquals('black', $tree[0]->getValueObject()->getValue()[0]);
151 $this->assertEquals('blue', $tree[1]->getValueObject()->getValue()[0]);
152 $this->assertEquals('gray', $tree[2]->getValueObject()->getValue()[0]);
153 $this->assertEquals('green', $tree[3]->getValueObject()->getValue()[0]);
154 $this->assertEquals('red', $tree[4]->getValueObject()->getValue()[0]);
155 $this->assertEquals('yellow', $tree[5]->getValueObject()->getValue()[0]);
159 $tree[3] // green
167 $tree[5] // yellow
181 $tree = $root->getChildren(true); // nest: color, type, brand -> model
182 …$this->assertCount(7, $tree, '6 root nodes of colors + 1 n/a expected'); // should have one n/a n…
183 $this->assertCount(2, $tree[6]->getChildren(true), 'top n/a node should have car, laptop');
184 $this->assertCount(3, $tree[0]->getChildren(true), 'black should have car,laptop,n/a');
195 $tree = $root->getChildren(true); // nest: material, color, *
197 $this->assertCount(3, $tree, '3 root nodes of material expected');
198 …$this->assertCount(1, $tree[0]->getChildren(true)[0]->getResultRows(), '1 metal black row expected…
209 $tree = $root->getChildren(true); // nest: index, material, color, *
211 $this->assertCount(3, $tree, '3 root index nodes expected');
212 $this->assertEquals('M', $tree[0]->getValueObject()->getValue(), 'M expected');
213 $this->assertCount(1, $tree[0]->getChildren(true), '1 metal sub node under M expected');
224 $tree = $root->getChildren(true);
226 $this->assertCount(2, $tree, '2 root index nodes expected');
227 $this->assertEquals('CA', $tree[0]->getValueObject()->getValue(), 'CA(r) index expected');
228 … $this->assertEquals('LA', $tree[1]->getValueObject()->getValue(), 'LA(ptop) index expected');
230 $this->assertCount(6, $tree[0]->getResultRows(), '6 rows under CA expected');
242 $tree = $root->getChildren(true);
244 $this->assertCount(4, $tree, '4 root index nodes expected');
245 … $this->assertEquals('BL', $tree[0]->getValueObject()->getValue(), 'BL(ack|blue) index expected');
247 $this->assertCount(4, $tree[0]->getResultRows(), '4 rows under BL expected');