ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilCertificateTemplateExportActionTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
25  public function testExport(): void
26  {
27  $templateRepository = $this->getMockBuilder(ilCertificateTemplateRepository::class)->getMock();
28 
29  $templateRepository->method('fetchCurrentlyActiveCertificate')
30  ->willReturn(new ilCertificateTemplate(
31  100,
32  'crs',
33  '<xml> Some Content </xml>',
34  md5('<xml> Some Content </xml>'),
35  '[]',
36  3,
37  'v5.4.0',
38  123_456_789,
39  true,
40  '/some/where/background.jpg',
41  '/some/where/tile_image.jpg',
42  '-',
43  '-',
44  50
45  ));
46 
47  $irss = $this->getMockBuilder(IRSS::class)
48  ->disableOriginalConstructor()
49  ->getMock();
50 
51  $objectHelper = $this->getMockBuilder(ilCertificateObjectHelper::class)
52  ->getMock();
53 
54  $objectHelper->method('lookupType')
55  ->willReturn('crs');
56 
57  $utilHelper = $this->getMockBuilder(ilCertificateUtilHelper::class)
58  ->disableOriginalConstructor()
59  ->getMock();
60 
61  $utilHelper
62  ->expects($this->once())
63  ->method('zipAndDeliver');
64 
66  100,
67  '/some/where/background.jpg',
68  $templateRepository,
69  $irss,
70  $objectHelper,
71  $utilHelper
72  );
73 
74  $action->export('some/where/root', 'phpunit');
75  }
76 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...