ILIAS  release_8 Revision v8.24
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
Container $dic
 

Detailed Description

Member Function Documentation

◆ testCriteriaAreInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testCriteriaAreInitiallyEmpty ( )

Definition at line 75 of file ilTermsOfServiceAcceptanceEntityTest.php.

75 : void
76 {
78 $this->assertEmpty($entity->getSerializedCriteria());
79 }

◆ testDocumentIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testDocumentIdIsInitiallyEmpty ( )

Definition at line 57 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testEntityShouldReturnCriteriaWhenCriteriaAreSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnCriteriaWhenCriteriaAreSet ( )

Definition at line 137 of file ilTermsOfServiceAcceptanceEntityTest.php.

137 : void
138 {
139 $expected = 'criteria';
140
141 $entity = new ilTermsOfServiceAcceptanceEntity();
142 $this->assertSame($expected, $entity->withSerializedCriteria($expected)->getSerializedCriteria());
143 }

◆ testEntityShouldReturnDocumentIdWhenDocumentIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnDocumentIdWhenDocumentIdIsSet ( )

Definition at line 105 of file ilTermsOfServiceAcceptanceEntityTest.php.

105 : void
106 {
107 $expected = 4711;
108
109 $entity = new ilTermsOfServiceAcceptanceEntity();
110 $this->assertSame($expected, $entity->withDocumentId($expected)->getDocumentId());
111 }

◆ testEntityShouldReturnHashWhenHashIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnHashWhenHashIsSet ( )

Definition at line 129 of file ilTermsOfServiceAcceptanceEntityTest.php.

129 : void
130 {
131 $expected = 'hash';
132
133 $entity = new ilTermsOfServiceAcceptanceEntity();
134 $this->assertSame($expected, $entity->withHash($expected)->getHash());
135 }

◆ testEntityShouldReturnIdWhenIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnIdWhenIdIsSet ( )

Definition at line 81 of file ilTermsOfServiceAcceptanceEntityTest.php.

81 : void
82 {
83 $expected = 4711;
84
86 $this->assertSame($expected, $entity->withId($expected)->getId());
87 }

◆ testEntityShouldReturnSourceTypeWhenSourceTypeIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnSourceTypeWhenSourceTypeIsSet ( )

Definition at line 113 of file ilTermsOfServiceAcceptanceEntityTest.php.

113 : void
114 {
115 $expected = 'Document PHP Unit';
116
117 $entity = new ilTermsOfServiceAcceptanceEntity();
118 $this->assertSame($expected, $entity->withTitle($expected)->getTitle());
119 }

◆ testEntityShouldReturnTextWhenTextIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTextWhenTextIsSet ( )

Definition at line 97 of file ilTermsOfServiceAcceptanceEntityTest.php.

97 : void
98 {
99 $expected = 'Lorem Ipsum';
100
101 $entity = new ilTermsOfServiceAcceptanceEntity();
102 $this->assertSame($expected, $entity->withText($expected)->getText());
103 }

◆ testEntityShouldReturnTimestampWhenTimestampIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTimestampWhenTimestampIsSet ( )

Definition at line 121 of file ilTermsOfServiceAcceptanceEntityTest.php.

121 : void
122 {
123 $expected = time();
124
125 $entity = new ilTermsOfServiceAcceptanceEntity();
126 $this->assertSame($expected, $entity->withTimestamp($expected)->getTimestamp());
127 }

◆ testEntityShouldReturnUserIdWhenUserIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnUserIdWhenUserIdIsSet ( )

Definition at line 89 of file ilTermsOfServiceAcceptanceEntityTest.php.

89 : void
90 {
91 $expected = 1337;
92
94 $this->assertSame($expected, $entity->withUserId($expected)->getUserId());
95 }

◆ testHashIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testHashIsInitiallyEmpty ( )

Definition at line 69 of file ilTermsOfServiceAcceptanceEntityTest.php.

69 : void
70 {
72 $this->assertEmpty($entity->getHash());
73 }

◆ testIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testIdIsInitiallyEmpty ( )

Definition at line 33 of file ilTermsOfServiceAcceptanceEntityTest.php.

33 : void
34 {
36 $this->assertEmpty($entity->getId());
37 }

◆ testInstanceCanBeCreated()

ilTermsOfServiceAcceptanceEntityTest::testInstanceCanBeCreated ( )

Definition at line 27 of file ilTermsOfServiceAcceptanceEntityTest.php.

27 : void
28 {
30 $this->assertInstanceOf(ilTermsOfServiceAcceptanceEntity::class, $entity);
31 }

◆ testTextIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTextIsInitiallyEmpty ( )

Definition at line 45 of file ilTermsOfServiceAcceptanceEntityTest.php.

45 : void
46 {
48 $this->assertEmpty($entity->getText());
49 }

◆ testTimestampOfSignatureIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTimestampOfSignatureIsInitiallyEmpty ( )

Definition at line 63 of file ilTermsOfServiceAcceptanceEntityTest.php.

63 : void
64 {
66 $this->assertEmpty($entity->getTimestamp());
67 }

◆ testTitleIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTitleIsInitiallyEmpty ( )

Definition at line 51 of file ilTermsOfServiceAcceptanceEntityTest.php.

51 : void
52 {
54 $this->assertEmpty($entity->getTitle());
55 }

◆ testUserIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testUserIdIsInitiallyEmpty ( )

Definition at line 39 of file ilTermsOfServiceAcceptanceEntityTest.php.

39 : void
40 {
42 $this->assertEmpty($entity->getUserId());
43 }

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