use Symfony\Component\Ldap\Exception\NotBoundException;
class EntryManagerTest extends TestCase
{ public function testMove() { $this->
expectException(LdapException::
class);
$this->
expectExceptionMessage('Entry "$$$$$$" malformed, could not parse RDN.'
);
$connection =
$this->
createMock(Connection::
class);
$entry =
new Entry('$$$$$$'
);
$entryManager =
new EntryManager($connection);
$entryManager->
move($entry, 'a'
);
} public function testGetResources() { $this->
expectException(NotBoundException::
class);
$this->
expectExceptionMessage('Query execution is not possible without binding the connection first.'
);
$connection =
$this->
createMock(Connection::
class);
$connection ->
expects($this->
once()) ->
method('isBound'
)->
willReturn(false
);