public function testRootsStatic() { $query = Cluster::whereNull('parent_id')->get(); $roots = Cluster::roots()->get(); $this->assertEquals($query->count(), $roots->count()); $this->assertCount(2, $roots); foreach ($query->lists('id') as $node) { $this->assertContains($node, $roots->lists('id')); } }