19 declare(strict_types=1);
30 $repository = $this->getMockBuilder(UserDataRepository::class)
31 ->disableOriginalConstructor()
33 $logger = new \ILIAS\components\Logging\NullLogger();
34 $database = $this->createMock(ilDBInterface::class);
36 $userData = new \ILIAS\Certificate\API\Data\UserCertificateDto(
44 'breakdanceMcFunkyPants',
46 'breakdance@funky.de',
50 $repository->method(
'getUserData')
51 ->willReturn([5 => $userData]);
53 $api = new \ILIAS\Certificate\API\UserCertificateAPI(
55 $this->createMock(ilCertificateTemplateRepository::class),
62 $this->getMockBuilder(ilObjectDataCache::class)->disableOriginalConstructor()->getMock()
65 $result = $api->getUserCertificateData(
new \
ILIAS\Certificate\API\
Filter\UserDataFilter(), []);
67 $this->assertSame([
'5' => $userData], $result);
Interface Observer Contains several chained tasks and infos about them.
Class ilCertificateBaseTestCase.