/**
  * Test copyParticipant function when the users have already joined the event.
  */
 public function testCopyParticipantDuplicate()
 {
     // This should not insert any records since the participants already joined the event
     static::$eventModel->copyParticipant(1, 2);
     $expectedTable = (new PHPUnit_ArrayDataSet(array('Participant' => array(parent::createParticipantObject(2, 1, 0), parent::createParticipantObject(2, 2, 0)))))->getTable('Participant');
     $actualTable = $this->getConnection()->createQueryTable('Participant', 'SELECT * FROM Participant WHERE EventID = 2');
     $this->assertEquals(4, $this->getConnection()->getRowCount('Participant'));
     $this->assertTablesEqual($expectedTable, $actualTable);
 }