From 396fea7299beb90083ff3c2750ee1932ebb6a03d Mon Sep 17 00:00:00 2001 From: Fabian Helfer Date: Thu, 19 Sep 2024 10:10:29 +0200 Subject: [PATCH] fix unit test placeholdervalues test --- .../tests/Certificate/TestPlaceholderValuesTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/ILIAS/Test/tests/Certificate/TestPlaceholderValuesTest.php b/components/ILIAS/Test/tests/Certificate/TestPlaceholderValuesTest.php index eca3251db57e..6ca094ea6b29 100644 --- a/components/ILIAS/Test/tests/Certificate/TestPlaceholderValuesTest.php +++ b/components/ILIAS/Test/tests/Certificate/TestPlaceholderValuesTest.php @@ -86,8 +86,17 @@ public function testA(): void $test_object->method('getMarkSchema') ->willReturn($mark_schema); + $user_object = $this->getMockBuilder(\ilObjUser::class) + ->disableOriginalConstructor() + ->getMock(); + $object_helper->method('getInstanceByObjId') - ->willReturn($test_object); + ->willReturnMap( + [ + [200, $test_object], + [10, $user_object] + ] + ); $test_object_helper = $this->getMockBuilder(CertificateTestObjectHelper::class) ->getMock();