ILIAS  release_8 Revision v8.23
ilTestSkillPointAccountTest 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 ilTestSkillPointAccountTest:
+ Collaboration diagram for ilTestSkillPointAccountTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testAddBooking ()
 
 testGetTotalReachedSkillPercent ()
 

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

ilTestSkillPointAccount $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 ilTestSkillPointAccountTest

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

Definition at line 25 of file ilTestSkillPointAccountTest.php.

Member Function Documentation

◆ setUp()

ilTestSkillPointAccountTest::setUp ( )
protected

Definition at line 29 of file ilTestSkillPointAccountTest.php.

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

◆ test_instantiateObject_shouldReturnInstance()

ilTestSkillPointAccountTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestSkillPointAccountTest.php.

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

◆ testAddBooking()

ilTestSkillPointAccountTest::testAddBooking ( )

Definition at line 41 of file ilTestSkillPointAccountTest.php.

41  : void
42  {
43  $this->testObj->addBooking(80, 20);
44  $this->assertEquals(80, $this->testObj->getTotalMaxSkillPoints());
45  $this->assertEquals(20, $this->testObj->getTotalReachedSkillPoints());
46 
47  $this->testObj->addBooking(50, 10);
48  $this->assertEquals(130, $this->testObj->getTotalMaxSkillPoints());
49  $this->assertEquals(30, $this->testObj->getTotalReachedSkillPoints());
50  }

◆ testGetTotalReachedSkillPercent()

ilTestSkillPointAccountTest::testGetTotalReachedSkillPercent ( )

Definition at line 52 of file ilTestSkillPointAccountTest.php.

52  : void
53  {
54  $this->testObj->addBooking(80, 20);
55  $this->testObj->addBooking(20, 30);
56  $this->assertEquals(50, $this->testObj->getTotalReachedSkillPercent());
57  }

Field Documentation

◆ $testObj

ilTestSkillPointAccount ilTestSkillPointAccountTest::$testObj
private

Definition at line 27 of file ilTestSkillPointAccountTest.php.


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