diff options
author | Robin Appelman <robin@icewind.nl> | 2017-12-20 15:51:37 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-12-20 15:51:37 +0100 |
commit | aad01894e38ff77781934c16b75dac43d49ec74a (patch) | |
tree | 2ee2e3354bf6987eea6dfb19a801cb6ac2987d6a /tests/lib/User/Backend.php | |
parent | ac14d02e1e23d8e31e11ed9729285d7fc5924543 (diff) | |
download | nextcloud-server-aad01894e38ff77781934c16b75dac43d49ec74a.tar.gz nextcloud-server-aad01894e38ff77781934c16b75dac43d49ec74a.zip |
refactor user searching
add additional user searching tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/User/Backend.php')
-rw-r--r-- | tests/lib/User/Backend.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/lib/User/Backend.php b/tests/lib/User/Backend.php index 85ccbac913c..1c7d482c480 100644 --- a/tests/lib/User/Backend.php +++ b/tests/lib/User/Backend.php @@ -103,15 +103,23 @@ abstract class Backend extends \Test\TestCase { $name1 = 'foobarbaz'; $name2 = 'bazbarfoo'; $name3 = 'notme'; + $name4 = 'under_score'; $this->backend->createUser($name1, 'pass1'); $this->backend->createUser($name2, 'pass2'); $this->backend->createUser($name3, 'pass3'); + $this->backend->createUser($name4, 'pass4'); $result = $this->backend->getUsers('bar'); - $this->assertSame(2, count($result)); + $this->assertCount(2, $result); $result = $this->backend->getDisplayNames('bar'); - $this->assertSame(2, count($result)); + $this->assertCount(2, $result); + + $result = $this->backend->getUsers('under_'); + $this->assertCount(1, $result); + + $result = $this->backend->getUsers('not_'); + $this->assertCount(0, $result); } } |