Example #1
0
 public function testAssignChildManyToMany()
 {
     $nonChild = $this->parentsTable->getChildren('friends', 1)->fetchRow();
     $this->parentsTable->assignChild('friends', 2, $nonChild['friend_id']);
     $childIds = $this->parentsTable->getChildren('friends', 2)->fetchColumn('friend_id');
     $this->assertTrue(in_array($nonChild['friend_id'], $childIds));
 }