public function manage(array $result) { $result = Client::cleanResult($result); $entities = array(); foreach ($result as $data) { $entity = $this->hydrater->hydrate($data['data']); $entity->_setDn($data['dn']); $entity->_setOriginData($data['data']); $entities[] = $entity; } return $entities; }
public function testComplexeQuery() { $search = $this->client->search('(&(objectclass=*)(|(telephoneNumber=03 00 00 00 01)(telephoneNumber=03 00 00 00 00)))', array('uid')); $this->assertEquals($search['count'], 2); }
public function testRead() { $this->assertEquals($this->client->read('uid=mdupont,ou=people,dc=example,dc=com', array('uid')), array('count' => 1, 0 => array('uid' => array('count' => 1, 0 => 'mdupont'), 0 => 'uid', 'count' => 1, 'dn' => 'uid=mdupont,ou=people,dc=example,dc=com'))); }