diff --git a/apps/user_ldap/tests/user_ldap.php b/apps/user_ldap/tests/user_ldap.php
index 8787e023655933bdfe2ebdc40c266a3f66856e49..e51f6cb5bb9e8c205190d9494c8bae63cc1db4a5 100644
--- a/apps/user_ldap/tests/user_ldap.php
+++ b/apps/user_ldap/tests/user_ldap.php
@@ -130,6 +130,11 @@ class Test_User_Ldap_Direct extends \PHPUnit_Framework_TestCase {
 			   ->with($this->equalTo('dnOfRoland,dc=test'))
 			   ->will($this->returnValue('gunslinger'));
 
+		$access->expects($this->any())
+			   ->method('stringResemblesDN')
+			   ->with($this->equalTo('dnOfRoland,dc=test'))
+			   ->will($this->returnValue(true));
+
 		$access->expects($this->any())
 			   ->method('areCredentialsValid')
 			   ->will($this->returnCallback(function($dn, $pwd) {