ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 
 getUiFactoryMock ()
 
 setGlobalVariable (string $name, $value)
 
 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.

85 : void
86 {
88 $this->assertEmpty($entity->getSerializedCriteria());
89 }
Class ilTermsOfServiceAcceptanceEntity.

◆ testDocumentIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testDocumentIdIsInitiallyEmpty ( )

Definition at line 58 of file ilTermsOfServiceAcceptanceEntityTest.php.

58 : void
59 {
61 $this->assertEmpty($entity->getDocumentId());
62 }

◆ testEntityShouldReturnCriteriaWhenCriteriaAreSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnCriteriaWhenCriteriaAreSet ( )

Definition at line 171 of file ilTermsOfServiceAcceptanceEntityTest.php.

171 : void
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.

127 : void
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.

160 : void
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.

94 : void
95 {
96 $expected = 4711;
97
99 $this->assertEquals($expected, $entity->withId($expected)->getId());
100 }

◆ testEntityShouldReturnSourceTypeWhenSourceTypeIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnSourceTypeWhenSourceTypeIsSet ( )

Definition at line 138 of file ilTermsOfServiceAcceptanceEntityTest.php.

138 : void
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.

116 : void
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.

149 : void
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.

105 : void
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.

76 : void
77 {
79 $this->assertEmpty($entity->getHash());
80 }

◆ testIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testIdIsInitiallyEmpty ( )

Definition at line 22 of file ilTermsOfServiceAcceptanceEntityTest.php.

22 : void
23 {
25 $this->assertEmpty($entity->getId());
26 }

◆ testInstanceCanBeCreated()

ilTermsOfServiceAcceptanceEntityTest::testInstanceCanBeCreated ( )

Definition at line 13 of file ilTermsOfServiceAcceptanceEntityTest.php.

13 : void
14 {
16 $this->assertInstanceOf(ilTermsOfServiceAcceptanceEntity::class, $entity);
17 }

◆ testTextIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTextIsInitiallyEmpty ( )

Definition at line 40 of file ilTermsOfServiceAcceptanceEntityTest.php.

40 : void
41 {
43 $this->assertEmpty($entity->getText());
44 }

◆ testTimestampOfSignatureIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTimestampOfSignatureIsInitiallyEmpty ( )

Definition at line 67 of file ilTermsOfServiceAcceptanceEntityTest.php.

67 : void
68 {
70 $this->assertEmpty($entity->getTimestamp());
71 }

◆ testTitleIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTitleIsInitiallyEmpty ( )

Definition at line 49 of file ilTermsOfServiceAcceptanceEntityTest.php.

49 : void
50 {
52 $this->assertEmpty($entity->getTitle());
53 }

◆ testUserIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testUserIdIsInitiallyEmpty ( )

Definition at line 31 of file ilTermsOfServiceAcceptanceEntityTest.php.

31 : void
32 {
34 $this->assertEmpty($entity->getUserId());
35 }

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