summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 11:09:10 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 14:19:35 +0100
commit03fe2b3b812e68765b5df6cb27e7f352ebbc2f87 (patch)
treef05c33029dfdd8b79a3e0fb708627a102a4e15f8 /tests
parent6146c474850557c16d5ac03477e9f8664b2555a7 (diff)
downloadnextcloud-server-03fe2b3b812e68765b5df6cb27e7f352ebbc2f87.tar.gz
nextcloud-server-03fe2b3b812e68765b5df6cb27e7f352ebbc2f87.zip
Use a case insensitive search for email
Fixes #7084 Now entering wrongly cased email (roeland@ instead of Roeland@) for password reset etc. Will also work. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/User/ManagerTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php
index e0b6aadf2ac..284f7b173bc 100644
--- a/tests/lib/User/ManagerTest.php
+++ b/tests/lib/User/ManagerTest.php
@@ -8,6 +8,7 @@
*/
namespace Test\User;
+use OC\AllConfig;
use OC\User\Database;
use OC\User\Manager;
use OCP\IConfig;
@@ -670,12 +671,12 @@ class ManagerTest extends TestCase {
}
public function testGetByEmail() {
- $config = $this->getMockBuilder(IConfig::class)
+ $config = $this->getMockBuilder(AllConfig::class)
->disableOriginalConstructor()
->getMock();
$config
->expects($this->at(0))
- ->method('getUsersForUserValue')
+ ->method('getUsersForUserValueCaseInsensitive')
->with('settings', 'email', 'test@example.com')
->will($this->returnValue(['uid1', 'uid99', 'uid2']));