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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testAddQuestionRelatedObjectives ()
 
 testHasQuestionRelatedObjectives ()
 

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

ilTestQuestionRelatedObjectivesList $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 ilTestQuestionRelatedObjectivesListTest

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

Definition at line 25 of file ilTestQuestionRelatedObjectivesListTest.php.

Member Function Documentation

◆ setUp()

ilTestQuestionRelatedObjectivesListTest::setUp ( )
protected

Definition at line 29 of file ilTestQuestionRelatedObjectivesListTest.php.

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

◆ test_instantiateObject_shouldReturnInstance()

ilTestQuestionRelatedObjectivesListTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestQuestionRelatedObjectivesListTest.php.

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

◆ testAddQuestionRelatedObjectives()

ilTestQuestionRelatedObjectivesListTest::testAddQuestionRelatedObjectives ( )

Definition at line 41 of file ilTestQuestionRelatedObjectivesListTest.php.

References ILIAS\LTI\ToolProvider\$key.

41  : void
42  {
43  $expected = [
44  1 => [1, 2, 3, 4],
45  2 => [5, 6, 7, 8],
46  1236 => [9, 10, 11, 12],
47  12 => [13, 14, 15, 16]
48  ];
49  foreach ($expected as $key => $value) {
50  $this->testObj->addQuestionRelatedObjectives($key, $value);
51  }
52 
53  $this->assertEquals($expected[1236], $this->testObj->getQuestionRelatedObjectives(1236));
54  }
string $key
Consumer key/client ID value.
Definition: System.php:193

◆ testHasQuestionRelatedObjectives()

ilTestQuestionRelatedObjectivesListTest::testHasQuestionRelatedObjectives ( )

Definition at line 56 of file ilTestQuestionRelatedObjectivesListTest.php.

References ILIAS\LTI\ToolProvider\$key.

56  : void
57  {
58  $expected = [
59  1 => [1, 2, 3, 4],
60  2 => [5, 6, 7, 8],
61  1236 => [9, 10, 11, 12],
62  12 => [13, 14, 16]
63  ];
64  foreach ($expected as $key => $value) {
65  $this->testObj->addQuestionRelatedObjectives($key, $value);
66  }
67 
68  $this->assertEquals(3, $this->testObj->hasQuestionRelatedObjectives(12));
69  }
string $key
Consumer key/client ID value.
Definition: System.php:193

Field Documentation

◆ $testObj

ilTestQuestionRelatedObjectivesList ilTestQuestionRelatedObjectivesListTest::$testObj
private

Definition at line 27 of file ilTestQuestionRelatedObjectivesListTest.php.


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