Example #1
0
 public function testSetChildrenManyToManyRelational()
 {
     $children = array(array('friend_id' => '2', 'parent_friend_relation' => 'looker'), array('friend_id' => '3', 'parent_friend_relation' => 'feeler'));
     $this->parentsTable->setChildren('friends', 1, $children, true, true);
     $newChildren = $this->parentsTable->getChildren('friends', 1, $this->connection->createQuery()->orderBy('friends.friend_id'))->fetchAll();
     foreach ($newChildren as $index => $child) {
         $this->assertCommonFieldsMatch($child->toArray(), $children[$index]);
     }
 }