ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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  {
87  $entity = new ilTermsOfServiceAcceptanceEntity();
88  $this->assertEmpty($entity->getSerializedCriteria());
89  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testDocumentIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testDocumentIdIsInitiallyEmpty ( )

Definition at line 58 of file ilTermsOfServiceAcceptanceEntityTest.php.

58  : void
59  {
60  $entity = new ilTermsOfServiceAcceptanceEntity();
61  $this->assertEmpty($entity->getDocumentId());
62  }
Class ilTermsOfServiceAcceptanceEntity.

◆ 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  }
Class ilTermsOfServiceAcceptanceEntity.

◆ 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  }
Class ilTermsOfServiceAcceptanceEntity.

◆ 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  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testEntityShouldReturnIdWhenIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnIdWhenIdIsSet ( )

Definition at line 94 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ 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  }
Class ilTermsOfServiceAcceptanceEntity.

◆ 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  }
Class ilTermsOfServiceAcceptanceEntity.

◆ 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  }
Class ilTermsOfServiceAcceptanceEntity.

◆ 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  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testHashIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testHashIsInitiallyEmpty ( )

Definition at line 76 of file ilTermsOfServiceAcceptanceEntityTest.php.

76  : void
77  {
78  $entity = new ilTermsOfServiceAcceptanceEntity();
79  $this->assertEmpty($entity->getHash());
80  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testIdIsInitiallyEmpty ( )

Definition at line 22 of file ilTermsOfServiceAcceptanceEntityTest.php.

22  : void
23  {
24  $entity = new ilTermsOfServiceAcceptanceEntity();
25  $this->assertEmpty($entity->getId());
26  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testInstanceCanBeCreated()

ilTermsOfServiceAcceptanceEntityTest::testInstanceCanBeCreated ( )

Definition at line 13 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testTextIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTextIsInitiallyEmpty ( )

Definition at line 40 of file ilTermsOfServiceAcceptanceEntityTest.php.

40  : void
41  {
42  $entity = new ilTermsOfServiceAcceptanceEntity();
43  $this->assertEmpty($entity->getText());
44  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testTimestampOfSignatureIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTimestampOfSignatureIsInitiallyEmpty ( )

Definition at line 67 of file ilTermsOfServiceAcceptanceEntityTest.php.

67  : void
68  {
69  $entity = new ilTermsOfServiceAcceptanceEntity();
70  $this->assertEmpty($entity->getTimestamp());
71  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testTitleIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTitleIsInitiallyEmpty ( )

Definition at line 49 of file ilTermsOfServiceAcceptanceEntityTest.php.

49  : void
50  {
51  $entity = new ilTermsOfServiceAcceptanceEntity();
52  $this->assertEmpty($entity->getTitle());
53  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testUserIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testUserIdIsInitiallyEmpty ( )

Definition at line 31 of file ilTermsOfServiceAcceptanceEntityTest.php.

31  : void
32  {
33  $entity = new ilTermsOfServiceAcceptanceEntity();
34  $this->assertEmpty($entity->getUserId());
35  }
Class ilTermsOfServiceAcceptanceEntity.

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