19 declare(strict_types=1);
25 $database = $this->createMock(ilDBInterface::class);
28 ->expects($this->once())
32 ->expects($this->once())
33 ->method(
'fetchAssoc')
34 ->willReturn([
'1' =>
'1']);
37 ->expects($this->once())
42 $templateRepository = $this->getMockBuilder(ilCertificateTemplateRepository::class)->getMock();
44 $templateRepository->method(
'fetchCertificateTemplatesByObjId')
50 '<xml> Some Content </xml>',
51 md5(
'<xml> Some Content </xml>'),
57 '/some/where/background.jpg',
58 '/some/where/card_tile_image.jpg',
66 '<xml> Some Content </xml>',
67 md5(
'<xml> Some Content </xml>'),
73 '/some/where/background.jpg',
74 '/some/where/card_tile_image.jpg',
82 '<xml> Some Content </xml>',
83 md5(
'<xml> Some Content </xml>'),
89 '/certificates/default/background.jpg',
90 '/some/where/card_tile_image.jpg',
99 ->expects($this->exactly(3))
102 $objectHelper = $this->getMockBuilder(ilCertificateObjectHelper::class)
105 $objectHelper->method(
'lookupObjId')
108 $global_certificate_settings = $this->getMockBuilder(ilObjCertificateSettings::class)
109 ->disableOriginalConstructor()
117 $global_certificate_settings
120 $oldObject = $this->getMockBuilder(ilObject::class)
121 ->disableOriginalConstructor()
124 $oldObject->method(
'getType')
127 $oldObject->method(
'getId')
130 $newObject = $this->getMockBuilder(ilObject::class)
131 ->disableOriginalConstructor()
134 $newObject->method(
'getType')
137 $newObject->method(
'getId')
140 $cloneAction->cloneCertificate($oldObject, $newObject,
'v5.4.0',
'/some/web/dir');
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null