private function generateSequenceValue($dn) { $sr = ldap_search($this->client->getLdapResource(), $dn, '(objectClass=integerSequence)'); $infos = ldap_get_entries($this->client->getLdapResource(), $sr); $sequence = $infos[0]; $return = $sequence['nextvalue'][0]; $newValue = $sequence['nextvalue'][0] + $sequence['increment'][0]; $entry = array('nextvalue' => array($newValue)); ldap_modify($this->client->getLdapResource(), $dn, $entry); return $return; }
/** * @covers CarnegieLearning\LdapOrmBundle\Ldap\Client::setLdap */ public function testSetLdapHandlesSuppliedObject() { $ldap = $this->client->setLdap(new Dummy()); $this->assertInstanceOf('\\Symfony\\Component\\PropertyInfo\\Tests\\Fixtures\\Dummy', $ldap); }