summaryrefslogtreecommitdiffstats
path: root/tests/lib/User
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-05-26 12:07:49 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-05-26 12:07:49 +0200
commitad6e548411f3fac33deee0efc0035838b783edb4 (patch)
treed5b2d4f361b2aea2bba1c234594bba95d21aa8c1 /tests/lib/User
parent0bfe3da6643f6add02af0e1c355e2aeae9cece42 (diff)
downloadnextcloud-server-ad6e548411f3fac33deee0efc0035838b783edb4.tar.gz
nextcloud-server-ad6e548411f3fac33deee0efc0035838b783edb4.zip
Added case example to tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests/lib/User')
-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());
}