From 8a354dac8269d788f3f8ea90732530eeacf53d98 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 17 Oct 2021 12:53:26 +0200 Subject: [PATCH] Fixup ProfileField Test (because of PermissionSet fix) --- tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php b/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php index ff52c7f08..845c89cc6 100644 --- a/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php +++ b/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php @@ -164,7 +164,7 @@ class ProfileFieldTest extends MockedTest $entity = new ProfileField($this->permissionSetDepository, $uid, $order, $psid, $label, $value, $created, $edited, $id); $permissionSet = $this->permissionSetFactory->createFromTableRow(['uid' => $uid, 'id' => $psid]); - $this->permissionSetDepository->shouldReceive('selectOneById')->with($psid)->andReturns($permissionSet); + $this->permissionSetDepository->shouldReceive('selectOneById')->with($psid, $uid)->andReturns($permissionSet); self::assertEquals($psid, $entity->permissionSet->id); } @@ -179,7 +179,7 @@ class ProfileFieldTest extends MockedTest $entity = new ProfileField($this->permissionSetDepository, $uid, $order, $psid, $label, $value, $created, $edited, $id); $permissionSet = $this->permissionSetFactory->createFromTableRow(['uid' => 12345, 'id' => $psid]); - $this->permissionSetDepository->shouldReceive('selectOneById')->with($psid)->andReturns($permissionSet); + $this->permissionSetDepository->shouldReceive('selectOneById')->with($psid, $uid)->andReturns($permissionSet); self::expectException(UnexpectedPermissionSetException::class); self::expectExceptionMessage(sprintf('PermissionSet %d (user-id: %d) for ProfileField %d (user-id: %d) is invalid.', $psid, 12345, $id, $uid)); @@ -195,7 +195,7 @@ class ProfileFieldTest extends MockedTest { $entity = new ProfileField($this->permissionSetDepository, $uid, $order, $psid, $label, $value, $created, $edited, $id); - $this->permissionSetDepository->shouldReceive('selectOneById')->with($psid) + $this->permissionSetDepository->shouldReceive('selectOneById')->with($psid, $uid) ->andThrow(new NotFoundException('test')); self::expectException(UnexpectedPermissionSetException::class);