[Ldap] add a test on parsing the rdn
This commit is contained in:
parent
2ecad3ffa9
commit
0abe32b085
@ -17,6 +17,22 @@ use Symfony\Component\Ldap\Entry;
|
|||||||
|
|
||||||
class EntryManagerTest extends TestCase
|
class EntryManagerTest extends TestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @expectedException \Symfony\Component\Ldap\Exception\LdapException
|
||||||
|
* @expectedExceptionMessage Entry "$$$$$$" malformed, could not parse RDN.
|
||||||
|
*/
|
||||||
|
public function testMove()
|
||||||
|
{
|
||||||
|
$connection = $this->createMock(Connection::class);
|
||||||
|
$connection
|
||||||
|
->expects($this->once())
|
||||||
|
->method('isBound')->willReturn(true);
|
||||||
|
|
||||||
|
$entry = new Entry('$$$$$$');
|
||||||
|
$entryManager = new EntryManager($connection);
|
||||||
|
$entryManager->move($entry, 'a');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\Ldap\Exception\NotBoundException
|
* @expectedException \Symfony\Component\Ldap\Exception\NotBoundException
|
||||||
* @expectedExceptionMessage Query execution is not possible without binding the connection first.
|
* @expectedExceptionMessage Query execution is not possible without binding the connection first.
|
||||||
|
Reference in New Issue
Block a user