public function testNextAll() { $root = new RootNode(); $parent_one = $this->createParentNode(); $parent_one->appendTo($root); $one = $this->createNode(); $one->appendTo($parent_one); $two = $this->createNode(); $two->appendTo($parent_one); $three = $this->createNode(); $three->appendTo($parent_one); $parent_two = $this->createParentNode(); $parent_two->appendTo($root); $first = $this->createNode(); $first->appendTo($parent_two); $second = $this->createNode(); $second->appendTo($parent_two); $third = $this->createNode(); $third->appendTo($parent_two); $collection = new NodeCollection([$one, $first], FALSE); $matches = $collection->nextAll(); $this->assertCount(4, $matches); $this->assertSame($two, $matches[0]); $this->assertSame($three, $matches[1]); $this->assertSame($second, $matches[2]); $this->assertSame($third, $matches[3]); }