Ejemplo n.º 1
0
 public function testChildrenRelationReferesToCorrectField()
 {
     $category = new Category();
     $this->assertEquals($category->getParentColumnName(), $category->children()->getPlainForeignKey());
     $this->assertEquals($category->getQualifiedParentColumnName(), $category->children()->getForeignKey());
 }
Ejemplo n.º 2
0
 public function testGetQualifiedParentColumnName()
 {
     $category = new Category();
     $this->assertEquals($category->getQualifiedParentColumnName(), 'categories.parent_id');
 }