/** * {@inheritdoc} */ public function searchCountersForMember($uid) { $data = array('uid' => $uid); $result = $this->oauth_client->authenticatedGetAsXml('uitpas/balie/list', $data); try { $xml = new CultureFeed_SimpleXMLElement($result); } catch (Exception $e) { throw new CultureFeed_ParseException($result); } $counters = array(); $objects = $xml->xpath('balies/balie'); $total = count($objects); foreach ($objects as $object) { $counters[] = CultureFeed_Uitpas_Counter_Employee::createFromXML($object); } return new CultureFeed_ResultSet($total, $counters); }
public function testGetGroupsFromCardSystems() { $this->assertEquals($this->groups, $this->employee->getGroupsFromCardSystems()); $emptyEmployee = new CultureFeed_Uitpas_Counter_Employee(); $this->assertEquals(array(), $emptyEmployee->getGroupsFromCardSystems()); }