ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestSessionTest Class Reference

Class ilTestSessionTest. More...

+ Inheritance diagram for ilTestSessionTest:
+ Collaboration diagram for ilTestSessionTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testRefId ()
 
 testActiveId ()
 
 testUserId ()
 
 testTestId ()
 
 testAnonymousId ()
 
 testLastSequence ()
 
 testPass ()
 
 testIncreasePass ()
 
 testSubmitted ()
 
 testSubmittedTimestamp ()
 
 testLastFinishedPass ()
 
 testObjectiveOrientedContainerId ()
 
 testLastStartedPass ()
 
 testIsObjectiveOriented ()
 
 testSetAccessCodeToSession ()
 
 testUnsetAccessCodeInSession ()
 
 testIsAnonymousUser ()
 
 testPasswordChecked ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_ui ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 

Private Attributes

ilTestSession $testObj
 

Additional Inherited Members

- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

Class ilTestSessionTest.

Author
Marvin Beym mbeym.nosp@m.@dat.nosp@m.abay..nosp@m.de

Definition at line 24 of file ilTestSessionTest.php.

Member Function Documentation

◆ setUp()

ilTestSessionTest::setUp ( )
protected

Definition at line 28 of file ilTestSessionTest.php.

28  : void
29  {
30  parent::setUp();
31 
32  $this->testObj = new ilTestSession();
33  }

◆ test_instantiateObject_shouldReturnInstance()

ilTestSessionTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 35 of file ilTestSessionTest.php.

35  : void
36  {
37  $this->assertInstanceOf(ilTestSession::class, $this->testObj);
38  }

◆ testActiveId()

ilTestSessionTest::testActiveId ( )

Definition at line 46 of file ilTestSessionTest.php.

46  : void
47  {
48  $this->testObj->active_id = 20;
49  $this->assertEquals(20, $this->testObj->getActiveId());
50  }

◆ testAnonymousId()

ilTestSessionTest::testAnonymousId ( )

Definition at line 64 of file ilTestSessionTest.php.

64  : void
65  {
66  $this->testObj->setAnonymousId(20);
67  $this->assertEquals(20, $this->testObj->getAnonymousId());
68  }

◆ testIncreasePass()

ilTestSessionTest::testIncreasePass ( )

Definition at line 82 of file ilTestSessionTest.php.

82  : void
83  {
84  $this->testObj->setPass(20);
85  $this->assertEquals(20, $this->testObj->getPass());
86 
87  $this->testObj->increasePass();
88  $this->assertEquals(21, $this->testObj->getPass());
89  }

◆ testIsAnonymousUser()

ilTestSessionTest::testIsAnonymousUser ( )

Definition at line 150 of file ilTestSessionTest.php.

References ANONYMOUS_USER_ID.

150  : void
151  {
152  $this->assertFalse($this->testObj->isAnonymousUser());
153 
154  $this->testObj->setUserId(ANONYMOUS_USER_ID);
155  $this->assertTrue($this->testObj->isAnonymousUser());
156  }
const ANONYMOUS_USER_ID
Definition: constants.php:27

◆ testIsObjectiveOriented()

ilTestSessionTest::testIsObjectiveOriented ( )

Definition at line 125 of file ilTestSessionTest.php.

125  : void
126  {
127  $this->assertFalse($this->testObj->isObjectiveOriented());
128 
129  $this->testObj->setObjectiveOrientedContainerId(20);
130  $this->assertTrue($this->testObj->isObjectiveOriented());
131  }

◆ testLastFinishedPass()

ilTestSessionTest::testLastFinishedPass ( )

Definition at line 107 of file ilTestSessionTest.php.

107  : void
108  {
109  $this->testObj->setLastFinishedPass(20);
110  $this->assertEquals(20, $this->testObj->getLastFinishedPass());
111  }

◆ testLastSequence()

ilTestSessionTest::testLastSequence ( )

Definition at line 70 of file ilTestSessionTest.php.

70  : void
71  {
72  $this->testObj->setLastSequence(20);
73  $this->assertEquals(20, $this->testObj->getLastSequence());
74  }

◆ testLastStartedPass()

ilTestSessionTest::testLastStartedPass ( )

Definition at line 119 of file ilTestSessionTest.php.

119  : void
120  {
121  $this->testObj->setLastStartedPass(20);
122  $this->assertEquals(20, $this->testObj->getLastStartedPass());
123  }

◆ testObjectiveOrientedContainerId()

ilTestSessionTest::testObjectiveOrientedContainerId ( )

Definition at line 113 of file ilTestSessionTest.php.

113  : void
114  {
115  $this->testObj->setObjectiveOrientedContainerId(20);
116  $this->assertEquals(20, $this->testObj->getObjectiveOrientedContainerId());
117  }

◆ testPass()

ilTestSessionTest::testPass ( )

Definition at line 76 of file ilTestSessionTest.php.

76  : void
77  {
78  $this->testObj->setPass(20);
79  $this->assertEquals(20, $this->testObj->getPass());
80  }

◆ testPasswordChecked()

ilTestSessionTest::testPasswordChecked ( )

Definition at line 158 of file ilTestSessionTest.php.

References ilSession\get().

158  : void
159  {
160  $this->testObj->active_id = 20;
161  $this->testObj->setPasswordChecked(true);
162  $this->assertTrue(ilSession::get('pw_checked_20'));
163  $this->assertTrue($this->testObj->isPasswordChecked());
164  }
static get(string $a_var)
+ Here is the call graph for this function:

◆ testRefId()

ilTestSessionTest::testRefId ( )

Definition at line 40 of file ilTestSessionTest.php.

40  : void
41  {
42  $this->testObj->setRefId(20);
43  $this->assertEquals(20, $this->testObj->getRefId());
44  }

◆ testSetAccessCodeToSession()

ilTestSessionTest::testSetAccessCodeToSession ( )

Definition at line 133 of file ilTestSessionTest.php.

References ilTestSession\ACCESS_CODE_SESSION_INDEX, ilSession\get(), and ilSession\set().

133  : void
134  {
136  $this->testObj->setAccessCodeToSession(17);
137  $this->assertEquals([17], ilSession::get(ilTestSession::ACCESS_CODE_SESSION_INDEX));
138  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ testSubmitted()

ilTestSessionTest::testSubmitted ( )

Definition at line 91 of file ilTestSessionTest.php.

91  : void
92  {
93  $this->assertFalse($this->testObj->isSubmitted());
94  $this->testObj->setSubmitted();
95 
96  $this->assertTrue($this->testObj->isSubmitted());
97  }

◆ testSubmittedTimestamp()

ilTestSessionTest::testSubmittedTimestamp ( )

Definition at line 99 of file ilTestSessionTest.php.

99  : void
100  {
101  $this->assertEmpty($this->testObj->getSubmittedTimestamp());
102  $this->testObj->setSubmittedTimestamp();
103 
104  $this->assertIsString($this->testObj->getSubmittedTimestamp());
105  }

◆ testTestId()

ilTestSessionTest::testTestId ( )

Definition at line 58 of file ilTestSessionTest.php.

58  : void
59  {
60  $this->testObj->setTestId(20);
61  $this->assertEquals(20, $this->testObj->getTestId());
62  }

◆ testUnsetAccessCodeInSession()

ilTestSessionTest::testUnsetAccessCodeInSession ( )

Definition at line 140 of file ilTestSessionTest.php.

References ilTestSession\ACCESS_CODE_SESSION_INDEX, ilSession\get(), and ilSession\set().

140  : void
141  {
143  $this->testObj->setAccessCodeToSession(17);
144  $this->assertEquals([17], ilSession::get(ilTestSession::ACCESS_CODE_SESSION_INDEX));
145 
146  $this->testObj->unsetAccessCodeInSession();
148  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ testUserId()

ilTestSessionTest::testUserId ( )

Definition at line 52 of file ilTestSessionTest.php.

52  : void
53  {
54  $this->testObj->setUserId(20);
55  $this->assertEquals(20, $this->testObj->getUserId());
56  }

Field Documentation

◆ $testObj

ilTestSession ilTestSessionTest::$testObj
private

Definition at line 26 of file ilTestSessionTest.php.


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