ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCertificateTemplateTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  public function testCreateCertificateTemplate(): void
27  {
28  $time = time();
29 
30  $template = new ilCertificateTemplate(
31  100,
32  'crs',
33  '<xml>crs</xml>',
34  md5('<xml>crs</xml>'),
35  '[]',
36  1,
37  'v5.4.0',
38  $time,
39  true,
40  '/some/where/background.jpg',
41  '/some/where/tile_image.svg',
42  '-',
43  '-',
44  555
45  );
46 
47  $this->assertSame(100, $template->getObjId());
48  $this->assertSame('crs', $template->getObjType());
49  $this->assertSame('<xml>crs</xml>', $template->getCertificateContent());
50  $this->assertSame(md5('<xml>crs</xml>'), $template->getCertificateHash());
51  $this->assertSame(1, $template->getVersion());
52  $this->assertSame('v5.4.0', $template->getIliasVersion());
53  $this->assertSame($time, $template->getCreatedTimestamp());
54  $this->assertTrue($template->isCurrentlyActive());
55  $this->assertSame('/some/where/background.jpg', $template->getCurrentBackgroundImageUsed());
56  $this->assertSame('/some/where/tile_image.svg', $template->getCurrentTileImageUsed());
57  $this->assertSame(555, $template->getId());
58  }
59 }
Class ilCertificateBaseTestCase.