コード例 #1
0
 public function testGetRootEqualsValueIfSetIfUnpersisted()
 {
     $parent = Cluster::roots()->first();
     $child = new Cluster();
     $child->setAttribute($child->getParentColumnName(), $parent->getKey());
     $this->assertEquals($child->getRoot(), $parent);
 }