aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Group/MetaDataTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Group/MetaDataTest.php')
-rw-r--r--tests/lib/Group/MetaDataTest.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php
index 70f2022ae78..1b58432fd88 100644
--- a/tests/lib/Group/MetaDataTest.php
+++ b/tests/lib/Group/MetaDataTest.php
@@ -7,12 +7,13 @@
namespace Test\Group;
+use OC\Group\MetaData;
use OCP\IUserSession;
class MetaDataTest extends \Test\TestCase {
private \OC\Group\Manager $groupManager;
private IUserSession $userSession;
- private \OC\Group\MetaData $groupMetadata;
+ private MetaData $groupMetadata;
private bool $isAdmin = true;
private bool $isDelegatedAdmin = true;
@@ -22,7 +23,7 @@ class MetaDataTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$this->userSession = $this->createMock(IUserSession::class);
- $this->groupMetadata = new \OC\Group\MetaData(
+ $this->groupMetadata = new MetaData(
'foo',
$this->isAdmin,
$this->isDelegatedAdmin,
@@ -37,23 +38,14 @@ class MetaDataTest extends \Test\TestCase {
->getMock();
$group->expects($this->exactly(6))
- ->method('getGID')
- ->will($this->onConsecutiveCalls(
- 'admin', 'admin',
- 'g2', 'g2',
- 'g3', 'g3'));
+ ->method('getGID')->willReturnOnConsecutiveCalls('admin', 'admin', 'g2', 'g2', 'g3', 'g3');
$group->expects($this->exactly(3))
- ->method('getDisplayName')
- ->will($this->onConsecutiveCalls(
- 'admin',
- 'g2',
- 'g3'));
+ ->method('getDisplayName')->willReturnOnConsecutiveCalls('admin', 'g2', 'g3');
$group->expects($this->exactly($countCallCount))
->method('count')
- ->with('')
- ->will($this->onConsecutiveCalls(2, 3, 5));
+ ->with('')->willReturnOnConsecutiveCalls(2, 3, 5);
return $group;
}