Skip to content

Commit fc42f19

Browse files
committed
Adjust Testcase to be make use of actual batch feature
1 parent 64717e6 commit fc42f19

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,20 @@ public function testBatchAddRemoveAttributeValues()
271271
$result = $this->executeSearchQuery(1);
272272
$entry = $result[0];
273273

274-
$entryManager->modifyBatch($entry->getDn(), array(new Modification(LDAP_MODIFY_BATCH_ADD, 'mail', array('fabpot@example.org', 'fabpot2@example.org'))));
274+
$entryManager->modifyBatch($entry->getDn(), array(
275+
new Modification(LDAP_MODIFY_BATCH_ADD, 'mail', array('fabpot@example.org', 'fabpot2@example.org')),
276+
new Modification(LDAP_MODIFY_BATCH_ADD, 'mail', array('fabpot3@example.org', 'fabpot4@example.org'))
277+
));
275278

276279
$result = $this->executeSearchQuery(1);
277280
$newEntry = $result[0];
278281

279-
$this->assertCount(4, $newEntry->getAttribute('mail'));
282+
$this->assertCount(6, $newEntry->getAttribute('mail'));
280283

281-
$entryManager->modifyBatch($entry->getDn(), array(new Modification(LDAP_MODIFY_BATCH_REMOVE, 'mail', array('fabpot@example.org', 'fabpot2@example.org'))));
284+
$entryManager->modifyBatch($entry->getDn(), array(
285+
new Modification(LDAP_MODIFY_BATCH_REMOVE, 'mail', array('fabpot@example.org', 'fabpot2@example.org')),
286+
new Modification(LDAP_MODIFY_BATCH_REMOVE, 'mail', array('fabpot3@example.org', 'fabpot4@example.org'))
287+
));
282288

283289
$result = $this->executeSearchQuery(1);
284290
$newNewEntry = $result[0];

0 commit comments

Comments
 (0)