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