/** * Remove given values from a LDAP attribute * * @param string $attribName * @param mixed|array $value * @return void */ public function removeFromAttribute($attribName, $value) { Zend_Ldap_Attribute::removeFromAttribute($this->_currentData, $attribName, $value); }
public function testRemoveAttributeValueInteger() { $data = array('test' => array('1', '2', '3', '4')); Zend_Ldap_Attribute::removeFromAttribute($data, 'test', array(2, 4)); $this->assertArrayHasKey('test', $data); $this->assertType('array', $data['test']); $this->assertEquals(2, count($data['test'])); $this->assertContains('1', $data['test']); $this->assertContains('3', $data['test']); $this->assertNotContains('2', $data['test']); $this->assertNotContains('4', $data['test']); }