diff options
author | Joas Schilling <coding@schilljs.com> | 2018-03-12 12:25:55 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-03-16 10:50:18 +0100 |
commit | 5e15c76d214d6d1425bf05ceaa937371e71eaa38 (patch) | |
tree | db604c98a0f15b4f1db9f200b6ae70e378e9daad /tests/lib | |
parent | ae369e870dea914c1d2d4cfac6d29dc4f51c4709 (diff) | |
download | nextcloud-server-5e15c76d214d6d1425bf05ceaa937371e71eaa38.tar.gz nextcloud-server-5e15c76d214d6d1425bf05ceaa937371e71eaa38.zip |
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Group/MetaDataTest.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php index 02c881b2e25..4e6389aad6b 100644 --- a/tests/lib/Group/MetaDataTest.php +++ b/tests/lib/Group/MetaDataTest.php @@ -53,13 +53,20 @@ class MetaDataTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); - $group->expects($this->exactly(9)) + $group->expects($this->exactly(6)) ->method('getGID') ->will($this->onConsecutiveCalls( 'admin', 'admin', 'g2', 'g2', 'g3', 'g3')); + $group->expects($this->exactly(3)) + ->method('getDisplayName') + ->will($this->onConsecutiveCalls( + 'display admin', + 'display g2', + 'display g3')); + $group->expects($this->exactly($countCallCount)) ->method('count') ->with('') @@ -83,7 +90,7 @@ class MetaDataTest extends \Test\TestCase { $this->assertSame(1, count($adminGroups)); $this->assertSame(2, count($ordinaryGroups)); - $this->assertSame('g2', $ordinaryGroups[0]['name']); + $this->assertSame('display g2', $ordinaryGroups[0]['name']); // user count is not loaded $this->assertSame(0, $ordinaryGroups[0]['usercount']); } @@ -103,7 +110,7 @@ class MetaDataTest extends \Test\TestCase { $this->assertSame(1, count($adminGroups)); $this->assertSame(2, count($ordinaryGroups)); - $this->assertSame('g3', $ordinaryGroups[0]['name']); + $this->assertSame('display g3', $ordinaryGroups[0]['name']); $this->assertSame(5, $ordinaryGroups[0]['usercount']); } |