ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTermsOfServiceAcceptanceEntityTest Class Reference

Class ilTermsOfServiceAcceptanceEntityTest. More...

+ Inheritance diagram for ilTermsOfServiceAcceptanceEntityTest:
+ Collaboration diagram for ilTermsOfServiceAcceptanceEntityTest:

Public Member Functions

 testInstanceCanBeCreated ()
 
 testIdIsInitiallyEmpty ()
 
 testUserIdIsInitiallyEmpty ()
 
 testTextIsInitiallyEmpty ()
 
 testTitleIsInitiallyEmpty ()
 
 testDocumentIdIsInitiallyEmpty ()
 
 testTimestampOfSignatureIsInitiallyEmpty ()
 
 testHashIsInitiallyEmpty ()
 
 testCriteriaAreInitiallyEmpty ()
 
 testEntityShouldReturnIdWhenIdIsSet ()
 
 testEntityShouldReturnUserIdWhenUserIdIsSet ()
 
 testEntityShouldReturnTextWhenTextIsSet ()
 
 testEntityShouldReturnDocumentIdWhenDocumentIdIsSet ()
 
 testEntityShouldReturnSourceTypeWhenSourceTypeIsSet ()
 
 testEntityShouldReturnTimestampWhenTimestampIsSet ()
 
 testEntityShouldReturnHashWhenHashIsSet ()
 
 testEntityShouldReturnCriteriaWhenCriteriaAreSet ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilTermsOfServiceBaseTest
 setUp ()
 
 getLanguageMock ()
 
 setGlobalVariable (string $name, $value)
 
 assertException (string $exceptionClass)
 
 getCriterionConfig ($value=null)
 
- Protected Attributes inherited from ilTermsOfServiceBaseTest
 $dic
 

Detailed Description

Member Function Documentation

◆ testCriteriaAreInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testCriteriaAreInitiallyEmpty ( )

Definition at line 85 of file ilTermsOfServiceAcceptanceEntityTest.php.

86 {
87 $entity = new \ilTermsOfServiceAcceptanceEntity();
88 $this->assertEmpty($entity->getSerializedCriteria());
89 }

◆ testDocumentIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testDocumentIdIsInitiallyEmpty ( )

Definition at line 58 of file ilTermsOfServiceAcceptanceEntityTest.php.

59 {
60 $entity = new \ilTermsOfServiceAcceptanceEntity();
61 $this->assertEmpty($entity->getDocumentId());
62 }

◆ testEntityShouldReturnCriteriaWhenCriteriaAreSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnCriteriaWhenCriteriaAreSet ( )

Definition at line 171 of file ilTermsOfServiceAcceptanceEntityTest.php.

172 {
173 $expected = 'criteria';
174
175 $entity = new \ilTermsOfServiceAcceptanceEntity();
176 $this->assertEquals($expected, $entity->withSerializedCriteria($expected)->getSerializedCriteria());
177 }

◆ testEntityShouldReturnDocumentIdWhenDocumentIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnDocumentIdWhenDocumentIdIsSet ( )

Definition at line 127 of file ilTermsOfServiceAcceptanceEntityTest.php.

128 {
129 $expected = 4711;
130
131 $entity = new \ilTermsOfServiceAcceptanceEntity();
132 $this->assertEquals($expected, $entity->withDocumentId($expected)->getDocumentId());
133 }

◆ testEntityShouldReturnHashWhenHashIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnHashWhenHashIsSet ( )

Definition at line 160 of file ilTermsOfServiceAcceptanceEntityTest.php.

161 {
162 $expected = 'hash';
163
164 $entity = new \ilTermsOfServiceAcceptanceEntity();
165 $this->assertEquals($expected, $entity->withHash($expected)->getHash());
166 }

◆ testEntityShouldReturnIdWhenIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnIdWhenIdIsSet ( )

Definition at line 94 of file ilTermsOfServiceAcceptanceEntityTest.php.

95 {
96 $expected = 4711;
97
98 $entity = new \ilTermsOfServiceAcceptanceEntity();
99 $this->assertEquals($expected, $entity->withId($expected)->getId());
100 }

◆ testEntityShouldReturnSourceTypeWhenSourceTypeIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnSourceTypeWhenSourceTypeIsSet ( )

Definition at line 138 of file ilTermsOfServiceAcceptanceEntityTest.php.

139 {
140 $expected = 'Document PHP Unit';
141
142 $entity = new \ilTermsOfServiceAcceptanceEntity();
143 $this->assertEquals($expected, $entity->withTitle($expected)->getTitle());
144 }

◆ testEntityShouldReturnTextWhenTextIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTextWhenTextIsSet ( )

Definition at line 116 of file ilTermsOfServiceAcceptanceEntityTest.php.

117 {
118 $expected = 'Lorem Ipsum';
119
120 $entity = new \ilTermsOfServiceAcceptanceEntity();
121 $this->assertEquals($expected, $entity->withText($expected)->getText());
122 }

◆ testEntityShouldReturnTimestampWhenTimestampIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTimestampWhenTimestampIsSet ( )

Definition at line 149 of file ilTermsOfServiceAcceptanceEntityTest.php.

150 {
151 $expected = time();
152
153 $entity = new \ilTermsOfServiceAcceptanceEntity();
154 $this->assertEquals($expected, $entity->withTimestamp($expected)->getTimestamp());
155 }

◆ testEntityShouldReturnUserIdWhenUserIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnUserIdWhenUserIdIsSet ( )

Definition at line 105 of file ilTermsOfServiceAcceptanceEntityTest.php.

106 {
107 $expected = 1337;
108
109 $entity = new \ilTermsOfServiceAcceptanceEntity();
110 $this->assertEquals($expected, $entity->withUserId($expected)->getUserId());
111 }

◆ testHashIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testHashIsInitiallyEmpty ( )

Definition at line 76 of file ilTermsOfServiceAcceptanceEntityTest.php.

77 {
78 $entity = new \ilTermsOfServiceAcceptanceEntity();
79 $this->assertEmpty($entity->getHash());
80 }

◆ testIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testIdIsInitiallyEmpty ( )

Definition at line 22 of file ilTermsOfServiceAcceptanceEntityTest.php.

23 {
24 $entity = new \ilTermsOfServiceAcceptanceEntity();
25 $this->assertEmpty($entity->getId());
26 }

◆ testInstanceCanBeCreated()

ilTermsOfServiceAcceptanceEntityTest::testInstanceCanBeCreated ( )

Definition at line 13 of file ilTermsOfServiceAcceptanceEntityTest.php.

14 {
15 $entity = new \ilTermsOfServiceAcceptanceEntity();
16 $this->assertInstanceOf(\ilTermsOfServiceAcceptanceEntity::class, $entity);
17 }

◆ testTextIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTextIsInitiallyEmpty ( )

Definition at line 40 of file ilTermsOfServiceAcceptanceEntityTest.php.

41 {
42 $entity = new \ilTermsOfServiceAcceptanceEntity();
43 $this->assertEmpty($entity->getText());
44 }

◆ testTimestampOfSignatureIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTimestampOfSignatureIsInitiallyEmpty ( )

Definition at line 67 of file ilTermsOfServiceAcceptanceEntityTest.php.

68 {
69 $entity = new \ilTermsOfServiceAcceptanceEntity();
70 $this->assertEmpty($entity->getTimestamp());
71 }

◆ testTitleIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTitleIsInitiallyEmpty ( )

Definition at line 49 of file ilTermsOfServiceAcceptanceEntityTest.php.

50 {
51 $entity = new \ilTermsOfServiceAcceptanceEntity();
52 $this->assertEmpty($entity->getTitle());
53 }

◆ testUserIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testUserIdIsInitiallyEmpty ( )

Definition at line 31 of file ilTermsOfServiceAcceptanceEntityTest.php.

32 {
33 $entity = new \ilTermsOfServiceAcceptanceEntity();
34 $this->assertEmpty($entity->getUserId());
35 }

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