Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25ba77b

Browse files
author
Kyle Evans
committed
symfony/ldap: Add a unit test for the new move functionality
1 parent 8b0ba65 commit 25ba77b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,22 @@ public function testUpdateOperationsThrowsExceptionWhenAddedDuplicatedValue()
341341

342342
$entryManager->applyOperations($entry->getDn(), $duplicateIterator);
343343
}
344+
345+
/**
346+
* @group functional
347+
*/
348+
public function testLdapMove()
349+
{
350+
$result = $this->executeSearchQuery(1);
351+
352+
$entry = $result[0];
353+
$this->assertNotContains('ou=Ldap', $entry->getDn());
354+
355+
$entryManager = $this->adapter->getEntryManager();
356+
$entryManager->move($entry, 'ou=Ldap,ou=Components,dc=symfony,dc=com');
357+
358+
$result = $this->executeSearchQuery(1);
359+
$movedEntry = $result[0];
360+
$this->assertContains('ou=Ldap', $movedEntry->getDn());
361+
}
344362
}

0 commit comments

Comments
 (0)