/** * testSetAttenderStatus */ public function testSetAttenderStatus() { $eventData = $this->testCreateEvent(); $numAttendee = count($eventData['attendee']); $eventData['attendee'][$numAttendee] = array('user_id' => $this->_getPersonasContacts('pwulf')->getId()); $updatedEventData = $this->_uit->saveEvent($eventData); $pwulf = $this->_findAttender($updatedEventData['attendee'], 'pwulf'); // he he, we don't have his authkey, cause json class sorts it out due to rights restrictions. $attendeeBackend = new Calendar_Backend_Sql_Attendee(); $pwulf['status_authkey'] = $attendeeBackend->get($pwulf['id'])->status_authkey; $updatedEventData['container_id'] = $updatedEventData['container_id']['id']; $pwulf['status'] = Calendar_Model_Attender::STATUS_ACCEPTED; $this->_uit->setAttenderStatus($updatedEventData, $pwulf, $pwulf['status_authkey']); $loadedEventData = $this->_uit->getEvent($eventData['id']); $loadedPwulf = $this->_findAttender($loadedEventData['attendee'], 'pwulf'); $this->assertEquals(Calendar_Model_Attender::STATUS_ACCEPTED, $loadedPwulf['status']); }