new UpdateOperation(\LDAP_MODIFY_BATCH_REMOVE, 'mail',
['fabpot3@example.org', 'fabpot4@example.org'
]),
]);
$result =
$this->
executeSearchQuery(1
);
$newNewEntry =
$result[0
];
$this->
assertCount(2,
$newNewEntry->
getAttribute('mail'
));
} public function testUpdateOperationsWithIterator() { $iteratorAdd =
new \
ArrayIterator([ new UpdateOperation(\LDAP_MODIFY_BATCH_ADD, 'mail',
['fabpot@example.org', 'fabpot2@example.org'
]),
new UpdateOperation(\LDAP_MODIFY_BATCH_ADD, 'mail',
['fabpot3@example.org', 'fabpot4@example.org'
]),
]);
$iteratorRemove =
new \
ArrayIterator([ new UpdateOperation(\LDAP_MODIFY_BATCH_REMOVE, 'mail',
['fabpot@example.org', 'fabpot2@example.org'
]),
new UpdateOperation(\LDAP_MODIFY_BATCH_REMOVE, 'mail',
['fabpot3@example.org', 'fabpot4@example.org'
]),
]);
$entryManager =
$this->adapter->
getEntryManager();