ILIAS  release_8 Revision v8.24
ilCertificateTemplateTest.php
Go to the documentation of this file.
1<?php
2
19declare(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/thumbnail.svg',
42 555
43 );
44
45 $this->assertSame(100, $template->getObjId());
46 $this->assertSame('crs', $template->getObjType());
47 $this->assertSame('<xml>crs</xml>', $template->getCertificateContent());
48 $this->assertSame(md5('<xml>crs</xml>'), $template->getCertificateHash());
49 $this->assertSame(1, $template->getVersion());
50 $this->assertSame('v5.4.0', $template->getIliasVersion());
51 $this->assertSame($time, $template->getCreatedTimestamp());
52 $this->assertTrue($template->isCurrentlyActive());
53 $this->assertSame('/some/where/background.jpg', $template->getBackgroundImagePath());
54 $this->assertSame(555, $template->getId());
55 }
56}
Class ilCertificateBaseTestCase.