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

Detailed Description

Member Function Documentation

◆ testCriteriaAreInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testCriteriaAreInitiallyEmpty ( )

Definition at line 75 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testDocumentIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testDocumentIdIsInitiallyEmpty ( )

Definition at line 57 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

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

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

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

◆ testEntityShouldReturnIdWhenIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnIdWhenIdIsSet ( )

Definition at line 81 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

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

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

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

◆ testEntityShouldReturnUserIdWhenUserIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnUserIdWhenUserIdIsSet ( )

Definition at line 89 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testHashIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testHashIsInitiallyEmpty ( )

Definition at line 69 of file ilTermsOfServiceAcceptanceEntityTest.php.

69  : void
70  {
71  $entity = new ilTermsOfServiceAcceptanceEntity();
72  $this->assertEmpty($entity->getHash());
73  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testIdIsInitiallyEmpty ( )

Definition at line 33 of file ilTermsOfServiceAcceptanceEntityTest.php.

33  : void
34  {
35  $entity = new ilTermsOfServiceAcceptanceEntity();
36  $this->assertEmpty($entity->getId());
37  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testInstanceCanBeCreated()

ilTermsOfServiceAcceptanceEntityTest::testInstanceCanBeCreated ( )

Definition at line 27 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testTextIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTextIsInitiallyEmpty ( )

Definition at line 45 of file ilTermsOfServiceAcceptanceEntityTest.php.

45  : void
46  {
47  $entity = new ilTermsOfServiceAcceptanceEntity();
48  $this->assertEmpty($entity->getText());
49  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testTimestampOfSignatureIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTimestampOfSignatureIsInitiallyEmpty ( )

Definition at line 63 of file ilTermsOfServiceAcceptanceEntityTest.php.

63  : void
64  {
65  $entity = new ilTermsOfServiceAcceptanceEntity();
66  $this->assertEmpty($entity->getTimestamp());
67  }
Class ilTermsOfServiceAcceptanceEntity.

◆ testTitleIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTitleIsInitiallyEmpty ( )

Definition at line 51 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testUserIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testUserIdIsInitiallyEmpty ( )

Definition at line 39 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

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