Esempio n. 1
0
 public function testGetOrganizersByGroup()
 {
     $responseArray = array(array('organizerkey' => 123456, 'groupkey' => 789, 'email' => '*****@*****.**', 'firstname' => 'Test', 'lastname' => 'Test', 'groupname' => 'testgroup', 'status' => 'active', 'maxnumattendeesallowed' => 25));
     $expectedOrganizer = new Organizer($responseArray[0]);
     $client = $this->getMockBuilder('Client')->setMethods(array('sendRequest'))->getMock();
     $client->method('sendRequest')->will($this->returnValue($responseArray));
     $groupService = new GroupService($client);
     $organizers = $groupService->getOrganizersByGroup(789);
     $this->assertNotEmpty($organizers);
     $this->assertNotNull($organizers[0]);
     $this->assertEquals($expectedOrganizer, $organizers[0]);
 }
Esempio n. 2
0
 /**
  * Get all organizers for a given group.
  *
  * Proxies to the group service for organizers because this API call is handles by the group endpoint.
  *
  * @param int $groupKey
  * @return array Organizers for the given Group
  */
 public function getOrganizersByGroup($groupKey)
 {
     $groupService = new GroupService($this->client);
     return $groupService->getOrganizersByGroup($groupKey);
 }