4 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceAcceptanceEntity.php';
5 require_once
'Services/TermsOfService/test/ilTermsOfServiceBaseTest.php';
31 $this->assertInstanceOf(
'ilTermsOfServiceAcceptanceEntity', $entity);
40 $this->assertEmpty($entity->getId());
49 $this->assertEmpty($entity->getUserId());
58 $this->assertEmpty($entity->getText());
67 $this->assertEmpty($entity->getSource());
76 $this->assertEmpty($entity->getSourceType());
85 $this->assertEmpty($entity->getIso2LanguageCode());
94 $this->assertEmpty($entity->getTimestamp());
103 $this->assertEmpty($entity->getHash());
114 $entity->setId($expected);
115 $this->assertEquals($expected, $entity->getId());
126 $entity->setUserId($expected);
127 $this->assertEquals($expected, $entity->getUserId());
135 $expected =
'Lorem Ipsum';
138 $entity->setText($expected);
139 $this->assertEquals($expected, $entity->getText());
147 $expected =
'/path/to/file';
150 $entity->setSource($expected);
151 $this->assertEquals($expected, $entity->getSource());
162 $entity->setSourceType($expected);
163 $this->assertEquals($expected, $entity->getSourceType());
174 $entity->setIso2LanguageCode($expected);
175 $this->assertEquals($expected, $entity->getIso2LanguageCode());
186 $entity->setTimestamp($expected);
187 $this->assertEquals($expected, $entity->getTimestamp());
198 $entity->setHash($expected);
199 $this->assertEquals($expected, $entity->getHash());
testEntityShouldReturnTextWhenTextIsSet()
testEntityShouldReturnTimestampWhenTimestampIsSet()
testUserIdIsInitiallyEmpty()
testEntityShouldReturnHashWhenHashIsSet()
testInstanceCanBeCreated()
testTextIsInitiallyEmpty()
testTimestampOfSigningIsInitiallyEmpty()
testHashIsInitiallyEmpty()
testEntityShouldReturnSourceTypeWhenSourceTypeIsSet()
testEntityShouldReturnUserIdWhenUserIdIsSet()
testLanguageOfAcceptanceIsInitiallyEmpty()
testEntityShouldReturnLanguageWhenLanguageIsSet()
testSourceIsInitiallyEmpty()
testEntityShouldReturnSourceWhenSourceIsSet()
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
testSourceTypeIsInitiallyEmpty()
testEntityShouldReturnIdWhenIdIsSet()