summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-05-28 15:52:37 +0200
committerGitHub <noreply@github.com>2018-05-28 15:52:37 +0200
commit9ddff6ff35d64955ba8a0fe711786b1ed986efcc (patch)
treeeb8fc48c1edc1e930b190da977760721b1776145 /tests
parentb76f806857148c6c81fdc2b324d22860e272d7e5 (diff)
parentad6e548411f3fac33deee0efc0035838b783edb4 (diff)
downloadnextcloud-server-9ddff6ff35d64955ba8a0fe711786b1ed986efcc.tar.gz
nextcloud-server-9ddff6ff35d64955ba8a0fe711786b1ed986efcc.zip
Merge pull request #9617 from nextcloud/users-sort-case-fix
Ignore case when sorting users
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/User/ManagerTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php
index 2ecae3a8500..d2e48ffa538 100644
--- a/tests/lib/User/ManagerTest.php
+++ b/tests/lib/User/ManagerTest.php
@@ -236,7 +236,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUsers')
->with($this->equalTo('fo'))
- ->will($this->returnValue(array('foo', 'afoo')));
+ ->will($this->returnValue(array('foo', 'afoo', 'Afoo1', 'Bfoo')));
$backend->expects($this->never())
->method('loginName2UserName');
@@ -244,8 +244,10 @@ class ManagerTest extends TestCase {
$manager->registerBackend($backend);
$result = $manager->search('fo');
- $this->assertEquals(2, count($result));
+ $this->assertEquals(4, count($result));
$this->assertEquals('afoo', array_shift($result)->getUID());
+ $this->assertEquals('Afoo1', array_shift($result)->getUID());
+ $this->assertEquals('Bfoo', array_shift($result)->getUID());
$this->assertEquals('foo', array_shift($result)->getUID());
}