public function it_should_error_trying_to_do_a_non_set_method_on_many_aggregated_values($connection)
{
$ldapObject = new LdapObject(['dn' => 'cn=foo,dc=foo,dc=bar'], [], 'user', 'user');
$ldapObject->set('disabled', true);
$ldapObject->add('trustedForAllDelegation', true);
$batch = $ldapObject->getBatchCollection();
$connection->execute(Argument::that(function ($operation) {
return $operation->getFilter() == '(&(objectClass=*))' && $operation->getBaseDn() == 'cn=foo,dc=foo,dc=bar' && $operation->getAttributes() == ['userAccountControl'];
}))->willReturn($this->expectedResult);
$this->beConstructedWith($this->schema, $batch, AttributeConverterInterface::TYPE_MODIFY);
$this->setLdapConnection($connection);
$this->setDn('cn=foo,dc=foo,dc=bar');
$this->shouldThrow(new \LogicException('Unable to modify "trustedForAllDelegation". The "ADD" action is not allowed.'))->duringToLdap();
}