public function testSanitizeDN() { $backend = $this->getMockBuilder('OCA\\User_LDAP\\User_LDAP')->setMethods([])->disableOriginalConstructor()->getMock(); $server = $this->getServerMock($backend); $helper = new \OCA\User_LDAP\Helper(); $ldapProvider = $this->getLDAPProvider($server); $this->assertEquals($helper->sanitizeDN('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org'), $ldapProvider->sanitizeDN('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org')); }