ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestParticipantScoringTest 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 ilTestParticipantScoringTest:
+ Collaboration diagram for ilTestParticipantScoringTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testActiveId ()
 
 testScoredPass ()
 
 testAnsweredQuestions ()
 
 testTotalQuestions ()
 
 testReachedPoints ()
 
 testMaxPoints ()
 
 testPassed ()
 
 testFinalMark ()
 
 testGetPercentResult ()
 

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

ilTestParticipantScoring $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 ilTestParticipantScoringTest

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

Definition at line 25 of file ilTestParticipantScoringTest.php.

Member Function Documentation

◆ setUp()

ilTestParticipantScoringTest::setUp ( )
protected

Definition at line 29 of file ilTestParticipantScoringTest.php.

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

◆ test_instantiateObject_shouldReturnInstance()

ilTestParticipantScoringTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestParticipantScoringTest.php.

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

◆ testActiveId()

ilTestParticipantScoringTest::testActiveId ( )

Definition at line 41 of file ilTestParticipantScoringTest.php.

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

◆ testAnsweredQuestions()

ilTestParticipantScoringTest::testAnsweredQuestions ( )

Definition at line 53 of file ilTestParticipantScoringTest.php.

53  : void
54  {
55  $this->testObj->setAnsweredQuestions(210);
56  $this->assertEquals(210, $this->testObj->getAnsweredQuestions());
57  }

◆ testFinalMark()

ilTestParticipantScoringTest::testFinalMark ( )

Definition at line 86 of file ilTestParticipantScoringTest.php.

86  : void
87  {
88  $this->testObj->setFinalMark("testString");
89  $this->assertEquals("testString", $this->testObj->getFinalMark());
90  }

◆ testGetPercentResult()

ilTestParticipantScoringTest::testGetPercentResult ( )

Definition at line 92 of file ilTestParticipantScoringTest.php.

92  : void
93  {
94  $this->assertEquals(0, $this->testObj->getPercentResult());
95 
96  $this->testObj->setMaxPoints(20);
97  $this->testObj->setReachedPoints(12);
98  $this->assertEquals(0.6, $this->testObj->getPercentResult());
99  }

◆ testMaxPoints()

ilTestParticipantScoringTest::testMaxPoints ( )

Definition at line 71 of file ilTestParticipantScoringTest.php.

71  : void
72  {
73  $this->testObj->setMaxPoints(210);
74  $this->assertEquals(210, $this->testObj->getMaxPoints());
75  }

◆ testPassed()

ilTestParticipantScoringTest::testPassed ( )

Definition at line 77 of file ilTestParticipantScoringTest.php.

77  : void
78  {
79  $this->testObj->setPassed(false);
80  $this->assertFalse($this->testObj->isPassed());
81 
82  $this->testObj->setPassed(true);
83  $this->assertTrue($this->testObj->isPassed());
84  }

◆ testReachedPoints()

ilTestParticipantScoringTest::testReachedPoints ( )

Definition at line 65 of file ilTestParticipantScoringTest.php.

65  : void
66  {
67  $this->testObj->setReachedPoints(210);
68  $this->assertEquals(210, $this->testObj->getReachedPoints());
69  }

◆ testScoredPass()

ilTestParticipantScoringTest::testScoredPass ( )

Definition at line 47 of file ilTestParticipantScoringTest.php.

47  : void
48  {
49  $this->testObj->setScoredPass(210);
50  $this->assertEquals(210, $this->testObj->getScoredPass());
51  }

◆ testTotalQuestions()

ilTestParticipantScoringTest::testTotalQuestions ( )

Definition at line 59 of file ilTestParticipantScoringTest.php.

59  : void
60  {
61  $this->testObj->setTotalQuestions(210);
62  $this->assertEquals(210, $this->testObj->getTotalQuestions());
63  }

Field Documentation

◆ $testObj

ilTestParticipantScoring ilTestParticipantScoringTest::$testObj
private

Definition at line 27 of file ilTestParticipantScoringTest.php.


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