public function testGetNeighborsAndSelf() { $root = new Node('r'); $root->addChild($a = new Node('a'))->addChild($b = new Node('b'))->addChild($c = new Node('c')); $this->assertEquals([$a, $b, $c], $a->getNeighborsAndSelf()); }