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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilTestParticipantTest:
+ Collaboration diagram for ilTestParticipantTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testActiveId ()
 
 testAnonymousId ()
 
 testUsrId ()
 
 testLogin ()
 
 testLastname ()
 
 testFirstname ()
 
 testMatriculation ()
 
 testActiveStatus ()
 
 testClientIp ()
 
 testFinishedTries ()
 
 testTestFinished ()
 
 testUnfinishedPasses ()
 
 testScoring ()
 
 testHasScoring ()
 

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

ilTestParticipant $testObj
 

Additional Inherited Members

- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning


Class ilTestParticipantTest

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

Definition at line 25 of file ilTestParticipantTest.php.

Member Function Documentation

◆ setUp()

ilTestParticipantTest::setUp ( )
protected

Definition at line 29 of file ilTestParticipantTest.php.

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

◆ test_instantiateObject_shouldReturnInstance()

ilTestParticipantTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestParticipantTest.php.

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

◆ testActiveId()

ilTestParticipantTest::testActiveId ( )

Definition at line 41 of file ilTestParticipantTest.php.

41  : void
42  {
43  $this->testObj->setActiveId("125");
44  $this->assertEquals("125", $this->testObj->getActiveId());
45  }

◆ testActiveStatus()

ilTestParticipantTest::testActiveStatus ( )

Definition at line 83 of file ilTestParticipantTest.php.

83  : void
84  {
85  $this->testObj->setActiveStatus(false);
86  $this->assertFalse($this->testObj->isActiveStatus());
87 
88  $this->testObj->setActiveStatus(true);
89  $this->assertTrue($this->testObj->isActiveStatus());
90  }

◆ testAnonymousId()

ilTestParticipantTest::testAnonymousId ( )

Definition at line 47 of file ilTestParticipantTest.php.

47  : void
48  {
49  $this->testObj->setAnonymousId("125");
50  $this->assertEquals("125", $this->testObj->getAnonymousId());
51  }

◆ testClientIp()

ilTestParticipantTest::testClientIp ( )

Definition at line 92 of file ilTestParticipantTest.php.

92  : void
93  {
94  $this->testObj->setClientIp("127.0.0.1");
95  $this->assertEquals("127.0.0.1", $this->testObj->getClientIp());
96  }

◆ testFinishedTries()

ilTestParticipantTest::testFinishedTries ( )

Definition at line 98 of file ilTestParticipantTest.php.

98  : void
99  {
100  $this->testObj->setFinishedTries(125);
101  $this->assertEquals(125, $this->testObj->getFinishedTries());
102  }

◆ testFirstname()

ilTestParticipantTest::testFirstname ( )

Definition at line 71 of file ilTestParticipantTest.php.

71  : void
72  {
73  $this->testObj->setFirstname("testFirstname");
74  $this->assertEquals("testFirstname", $this->testObj->getFirstname());
75  }

◆ testHasScoring()

ilTestParticipantTest::testHasScoring ( )

Definition at line 129 of file ilTestParticipantTest.php.

129  : void
130  {
131  $mock = $this->createMock(ilTestParticipantScoring::class);
132  $this->assertFalse($this->testObj->hasScoring());
133 
134  $this->testObj->setScoring($mock);
135  $this->assertEquals($mock, $this->testObj->getScoring());
136  $this->assertTrue($this->testObj->hasScoring());
137  }

◆ testLastname()

ilTestParticipantTest::testLastname ( )

Definition at line 65 of file ilTestParticipantTest.php.

65  : void
66  {
67  $this->testObj->setLastname("testLastname");
68  $this->assertEquals("testLastname", $this->testObj->getLastname());
69  }

◆ testLogin()

ilTestParticipantTest::testLogin ( )

Definition at line 59 of file ilTestParticipantTest.php.

59  : void
60  {
61  $this->testObj->setLogin("testLogin");
62  $this->assertEquals("testLogin", $this->testObj->getLogin());
63  }

◆ testMatriculation()

ilTestParticipantTest::testMatriculation ( )

Definition at line 77 of file ilTestParticipantTest.php.

77  : void
78  {
79  $this->testObj->setMatriculation("testMatriculation");
80  $this->assertEquals("testMatriculation", $this->testObj->getMatriculation());
81  }

◆ testScoring()

ilTestParticipantTest::testScoring ( )

Definition at line 122 of file ilTestParticipantTest.php.

122  : void
123  {
124  $mock = $this->createMock(ilTestParticipantScoring::class);
125  $this->testObj->setScoring($mock);
126  $this->assertEquals($mock, $this->testObj->getScoring());
127  }

◆ testTestFinished()

ilTestParticipantTest::testTestFinished ( )

Definition at line 104 of file ilTestParticipantTest.php.

104  : void
105  {
106  $this->testObj->setTestFinished(false);
107  $this->assertFalse($this->testObj->isTestFinished());
108 
109  $this->testObj->setTestFinished(true);
110  $this->assertTrue($this->testObj->isTestFinished());
111  }

◆ testUnfinishedPasses()

ilTestParticipantTest::testUnfinishedPasses ( )

Definition at line 113 of file ilTestParticipantTest.php.

113  : void
114  {
115  $this->testObj->setUnfinishedPasses(false);
116  $this->assertFalse($this->testObj->hasUnfinishedPasses());
117 
118  $this->testObj->setUnfinishedPasses(true);
119  $this->assertTrue($this->testObj->hasUnfinishedPasses());
120  }

◆ testUsrId()

ilTestParticipantTest::testUsrId ( )

Definition at line 53 of file ilTestParticipantTest.php.

53  : void
54  {
55  $this->testObj->setUsrId("125");
56  $this->assertEquals("125", $this->testObj->getUsrId());
57  }

Field Documentation

◆ $testObj

ilTestParticipant ilTestParticipantTest::$testObj
private

Definition at line 27 of file ilTestParticipantTest.php.


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