ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilUserCertificateTest Class Reference
+ Inheritance diagram for ilUserCertificateTest:
+ Collaboration diagram for ilUserCertificateTest:

Public Member Functions

 testCreateUserCertificate ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilCertificateBaseTestCase
 setUp ()
 
 tearDown ()
 
 assertDoesNotThrow (callable $cb, string $message='')
 
 assertThrows (callable $cb, ?string $expected_class=null, ?string $expected_message=null)
 @template T of Throwable More...
 
 setGlobalVariable (string $name, mixed $value)
 
- Protected Attributes inherited from ilCertificateBaseTestCase
Container $dic
 

Detailed Description

Definition at line 23 of file ilUserCertificateTest.php.

Member Function Documentation

◆ testCreateUserCertificate()

ilUserCertificateTest::testCreateUserCertificate ( )

Definition at line 25 of file ilUserCertificateTest.php.

25 : void
26 {
27 $userCertificate = new ilUserCertificate(
28 1,
29 20,
30 'crs',
31 400,
32 'Niels Theen',
33 123_456_789,
34 '<xml>Some Content</xml>',
35 '[]',
36 null,
37 1,
38 'v5.4.0',
39 true,
40 new CertificateId('11111111-2222-3333-4444-555555555555'),
41 '/some/where/background.jpg',
42 '/some/where/tile_image.svg',
43 '',
44 '',
45 140,
46 );
47
48 $this->assertSame(1, $userCertificate->getPatternCertificateId());
49 $this->assertSame(20, $userCertificate->getObjId());
50 $this->assertSame('crs', $userCertificate->getObjType());
51 $this->assertSame(400, $userCertificate->getUserId());
52 $this->assertSame('Niels Theen', $userCertificate->getUserName());
53 $this->assertSame(123_456_789, $userCertificate->getAcquiredTimestamp());
54 $this->assertSame('<xml>Some Content</xml>', $userCertificate->getCertificateContent());
55 $this->assertSame('[]', $userCertificate->getTemplateValues());
56 $this->assertEquals(0, $userCertificate->getValidUntil());
57 $this->assertSame(1, $userCertificate->getVersion());
58 $this->assertSame('v5.4.0', $userCertificate->getIliasVersion());
59 $this->assertTrue($userCertificate->isCurrentlyActive());
60 $this->assertSame('/some/where/background.jpg', $userCertificate->getCurrentBackgroundImageUsed());
61 $this->assertSame(140, $userCertificate->getId());
62 $this->assertSame('11111111-2222-3333-4444-555555555555', $userCertificate->getCertificateId()->asString());
63 }

The documentation for this class was generated from the following file: