From e16682aeda94c3c86be131371c35cb4255b86f3a Mon Sep 17 00:00:00 2001 From: Dries Mys Date: Sat, 5 Jun 2021 21:23:22 +0200 Subject: Effectively return a valid group as it would be the case in a real situation. Returned group object is now used to set the displayname if provided. Signed-off-by: Dries Mys --- apps/provisioning_api/tests/Controller/GroupsControllerTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apps/provisioning_api') diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index 66e7665de63..12010995560 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -405,10 +405,12 @@ class GroupsControllerTest extends \Test\TestCase { ->with('NewGroup') ->willReturn(false); + $group = $this->createGroup('NewGroup'); $this->groupManager ->expects($this->once()) ->method('createGroup') - ->with('NewGroup'); + ->with('NewGroup') + ->willReturn($group); $this->api->addGroup('NewGroup'); } @@ -419,10 +421,12 @@ class GroupsControllerTest extends \Test\TestCase { ->with('Iñtërnâtiônàlizætiøn') ->willReturn(false); + $group = $this->createGroup('Iñtërnâtiônàlizætiøn'); $this->groupManager ->expects($this->once()) ->method('createGroup') - ->with('Iñtërnâtiônàlizætiøn'); + ->with('Iñtërnâtiônàlizætiøn') + ->willReturn($group); $this->api->addGroup('Iñtërnâtiônàlizætiøn'); } -- cgit v1.2.3