Esempio n. 1
0
 public function testGetGroups()
 {
     $responseArray = array('groupkey' => 300000000000011, 'parentKey' => 300000000000011, 'groupName' => 'Something 1, Inc.', 'status' => 'active', 'numOrganizers' => 7);
     $expectedGroup = new Group($responseArray);
     $client = $this->getMockBuilder('Client')->setMethods(array('sendRequest'))->getMock();
     $client->method('sendRequest')->will($this->returnValue(array($responseArray)));
     $groupService = new GroupService($client);
     $actualGroups = $groupService->getGroups();
     $this->assertNotEmpty($actualGroups);
     $this->assertNotNull($actualGroups[0]);
     $this->assertEquals($actualGroups[0], $expectedGroup);
 }
Esempio n. 2
0
 public function testGetGroups()
 {
     $groups = $this->groupService->getGroups();
     $this->assertNotEmpty($groups);
     $this->assertInstanceOf('Group', $groups[0]);
 }