ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTermsOfServiceAcceptanceEntityTest Class Reference
+ Inheritance diagram for ilTermsOfServiceAcceptanceEntityTest:
+ Collaboration diagram for ilTermsOfServiceAcceptanceEntityTest:

Public Member Functions

 setUp ()
 
 testInstanceCanBeCreated ()
 
 testIdIsInitiallyEmpty ()
 
 testUserIdIsInitiallyEmpty ()
 
 testTextIsInitiallyEmpty ()
 
 testSourceIsInitiallyEmpty ()
 
 testSourceTypeIsInitiallyEmpty ()
 
 testLanguageOfAcceptanceIsInitiallyEmpty ()
 
 testTimestampOfSigningIsInitiallyEmpty ()
 
 testHashIsInitiallyEmpty ()
 
 testEntityShouldReturnIdWhenIdIsSet ()
 
 testEntityShouldReturnUserIdWhenUserIdIsSet ()
 
 testEntityShouldReturnTextWhenTextIsSet ()
 
 testEntityShouldReturnSourceWhenSourceIsSet ()
 
 testEntityShouldReturnSourceTypeWhenSourceTypeIsSet ()
 
 testEntityShouldReturnLanguageWhenLanguageIsSet ()
 
 testEntityShouldReturnTimestampWhenTimestampIsSet ()
 
 testEntityShouldReturnHashWhenHashIsSet ()
 

Protected Attributes

 $backupGlobals = false
 

Additional Inherited Members

- Protected Member Functions inherited from ilTermsOfServiceBaseTest
 assertException ($exception_class)
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 11 of file ilTermsOfServiceAcceptanceEntityTest.php.

Member Function Documentation

◆ setUp()

ilTermsOfServiceAcceptanceEntityTest::setUp ( )

Definition at line 21 of file ilTermsOfServiceAcceptanceEntityTest.php.

22  {
23  }

◆ testEntityShouldReturnHashWhenHashIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnHashWhenHashIsSet ( )

Definition at line 193 of file ilTermsOfServiceAcceptanceEntityTest.php.

194  {
195  $expected = 'hash';
196 
197  $entity = new ilTermsOfServiceAcceptanceEntity();
198  $entity->setHash($expected);
199  $this->assertEquals($expected, $entity->getHash());
200  }

◆ testEntityShouldReturnIdWhenIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnIdWhenIdIsSet ( )

Definition at line 109 of file ilTermsOfServiceAcceptanceEntityTest.php.

110  {
111  $expected = 4711;
112 
113  $entity = new ilTermsOfServiceAcceptanceEntity();
114  $entity->setId($expected);
115  $this->assertEquals($expected, $entity->getId());
116  }

◆ testEntityShouldReturnLanguageWhenLanguageIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnLanguageWhenLanguageIsSet ( )

Definition at line 169 of file ilTermsOfServiceAcceptanceEntityTest.php.

170  {
171  $expected = 'de';
172 
173  $entity = new ilTermsOfServiceAcceptanceEntity();
174  $entity->setIso2LanguageCode($expected);
175  $this->assertEquals($expected, $entity->getIso2LanguageCode());
176  }

◆ testEntityShouldReturnSourceTypeWhenSourceTypeIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnSourceTypeWhenSourceTypeIsSet ( )

Definition at line 157 of file ilTermsOfServiceAcceptanceEntityTest.php.

158  {
159  $expected = 1;
160 
161  $entity = new ilTermsOfServiceAcceptanceEntity();
162  $entity->setSourceType($expected);
163  $this->assertEquals($expected, $entity->getSourceType());
164  }

◆ testEntityShouldReturnSourceWhenSourceIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnSourceWhenSourceIsSet ( )

Definition at line 145 of file ilTermsOfServiceAcceptanceEntityTest.php.

146  {
147  $expected = '/path/to/file';
148 
149  $entity = new ilTermsOfServiceAcceptanceEntity();
150  $entity->setSource($expected);
151  $this->assertEquals($expected, $entity->getSource());
152  }

◆ testEntityShouldReturnTextWhenTextIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTextWhenTextIsSet ( )

Definition at line 133 of file ilTermsOfServiceAcceptanceEntityTest.php.

134  {
135  $expected = 'Lorem Ipsum';
136 
137  $entity = new ilTermsOfServiceAcceptanceEntity();
138  $entity->setText($expected);
139  $this->assertEquals($expected, $entity->getText());
140  }

◆ testEntityShouldReturnTimestampWhenTimestampIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTimestampWhenTimestampIsSet ( )

Definition at line 181 of file ilTermsOfServiceAcceptanceEntityTest.php.

References time.

182  {
183  $expected = time();
184 
185  $entity = new ilTermsOfServiceAcceptanceEntity();
186  $entity->setTimestamp($expected);
187  $this->assertEquals($expected, $entity->getTimestamp());
188  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.

◆ testEntityShouldReturnUserIdWhenUserIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnUserIdWhenUserIdIsSet ( )

Definition at line 121 of file ilTermsOfServiceAcceptanceEntityTest.php.

122  {
123  $expected = 1337;
124 
125  $entity = new ilTermsOfServiceAcceptanceEntity();
126  $entity->setUserId($expected);
127  $this->assertEquals($expected, $entity->getUserId());
128  }

◆ testHashIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testHashIsInitiallyEmpty ( )

Definition at line 100 of file ilTermsOfServiceAcceptanceEntityTest.php.

101  {
102  $entity = new ilTermsOfServiceAcceptanceEntity();
103  $this->assertEmpty($entity->getHash());
104  }

◆ testIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testIdIsInitiallyEmpty ( )

Definition at line 37 of file ilTermsOfServiceAcceptanceEntityTest.php.

38  {
39  $entity = new ilTermsOfServiceAcceptanceEntity();
40  $this->assertEmpty($entity->getId());
41  }

◆ testInstanceCanBeCreated()

ilTermsOfServiceAcceptanceEntityTest::testInstanceCanBeCreated ( )

Definition at line 28 of file ilTermsOfServiceAcceptanceEntityTest.php.

29  {
30  $entity = new ilTermsOfServiceAcceptanceEntity();
31  $this->assertInstanceOf('ilTermsOfServiceAcceptanceEntity', $entity);
32  }

◆ testLanguageOfAcceptanceIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testLanguageOfAcceptanceIsInitiallyEmpty ( )

Definition at line 82 of file ilTermsOfServiceAcceptanceEntityTest.php.

83  {
84  $entity = new ilTermsOfServiceAcceptanceEntity();
85  $this->assertEmpty($entity->getIso2LanguageCode());
86  }

◆ testSourceIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testSourceIsInitiallyEmpty ( )

Definition at line 64 of file ilTermsOfServiceAcceptanceEntityTest.php.

65  {
66  $entity = new ilTermsOfServiceAcceptanceEntity();
67  $this->assertEmpty($entity->getSource());
68  }

◆ testSourceTypeIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testSourceTypeIsInitiallyEmpty ( )

Definition at line 73 of file ilTermsOfServiceAcceptanceEntityTest.php.

74  {
75  $entity = new ilTermsOfServiceAcceptanceEntity();
76  $this->assertEmpty($entity->getSourceType());
77  }

◆ testTextIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTextIsInitiallyEmpty ( )

Definition at line 55 of file ilTermsOfServiceAcceptanceEntityTest.php.

56  {
57  $entity = new ilTermsOfServiceAcceptanceEntity();
58  $this->assertEmpty($entity->getText());
59  }

◆ testTimestampOfSigningIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTimestampOfSigningIsInitiallyEmpty ( )

Definition at line 91 of file ilTermsOfServiceAcceptanceEntityTest.php.

92  {
93  $entity = new ilTermsOfServiceAcceptanceEntity();
94  $this->assertEmpty($entity->getTimestamp());
95  }

◆ testUserIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testUserIdIsInitiallyEmpty ( )

Definition at line 46 of file ilTermsOfServiceAcceptanceEntityTest.php.

47  {
48  $entity = new ilTermsOfServiceAcceptanceEntity();
49  $this->assertEmpty($entity->getUserId());
50  }

Field Documentation

◆ $backupGlobals

ilTermsOfServiceAcceptanceEntityTest::$backupGlobals = false
protected

Definition at line 16 of file ilTermsOfServiceAcceptanceEntityTest.php.


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