ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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
 

Detailed Description

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

Definition at line 10 of file ilTermsOfServiceAcceptanceEntityTest.php.

Member Function Documentation

◆ setUp()

ilTermsOfServiceAcceptanceEntityTest::setUp ( )

Definition at line 20 of file ilTermsOfServiceAcceptanceEntityTest.php.

21  {
22  }

◆ testEntityShouldReturnHashWhenHashIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnHashWhenHashIsSet ( )

Definition at line 192 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testEntityShouldReturnIdWhenIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnIdWhenIdIsSet ( )

Definition at line 108 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testEntityShouldReturnLanguageWhenLanguageIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnLanguageWhenLanguageIsSet ( )

Definition at line 168 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testEntityShouldReturnSourceTypeWhenSourceTypeIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnSourceTypeWhenSourceTypeIsSet ( )

Definition at line 156 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testEntityShouldReturnSourceWhenSourceIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnSourceWhenSourceIsSet ( )

Definition at line 144 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testEntityShouldReturnTextWhenTextIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTextWhenTextIsSet ( )

Definition at line 132 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testEntityShouldReturnTimestampWhenTimestampIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnTimestampWhenTimestampIsSet ( )

Definition at line 180 of file ilTermsOfServiceAcceptanceEntityTest.php.

181  {
182  $expected = time();
183 
184  $entity = new ilTermsOfServiceAcceptanceEntity();
185  $entity->setTimestamp($expected);
186  $this->assertEquals($expected, $entity->getTimestamp());
187  }

◆ testEntityShouldReturnUserIdWhenUserIdIsSet()

ilTermsOfServiceAcceptanceEntityTest::testEntityShouldReturnUserIdWhenUserIdIsSet ( )

Definition at line 120 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testHashIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testHashIsInitiallyEmpty ( )

Definition at line 99 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testIdIsInitiallyEmpty ( )

Definition at line 36 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testInstanceCanBeCreated()

ilTermsOfServiceAcceptanceEntityTest::testInstanceCanBeCreated ( )

Definition at line 27 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testLanguageOfAcceptanceIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testLanguageOfAcceptanceIsInitiallyEmpty ( )

Definition at line 81 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testSourceIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testSourceIsInitiallyEmpty ( )

Definition at line 63 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testSourceTypeIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testSourceTypeIsInitiallyEmpty ( )

Definition at line 72 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testTextIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTextIsInitiallyEmpty ( )

Definition at line 54 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testTimestampOfSigningIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testTimestampOfSigningIsInitiallyEmpty ( )

Definition at line 90 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

◆ testUserIdIsInitiallyEmpty()

ilTermsOfServiceAcceptanceEntityTest::testUserIdIsInitiallyEmpty ( )

Definition at line 45 of file ilTermsOfServiceAcceptanceEntityTest.php.

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

Field Documentation

◆ $backupGlobals

ilTermsOfServiceAcceptanceEntityTest::$backupGlobals = false
protected

Definition at line 15 of file ilTermsOfServiceAcceptanceEntityTest.php.


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