public function testGetRootEqualsValueIfSetIfUnpersisted() { $parent = Category::roots()->first(); $child = new Category(); $child->setAttribute($child->getParentColumnName(), $parent->getKey()); $this->assertEquals($child->getRoot(), $parent); }