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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testId ()
 
 testPoolId ()
 
 testPoolTitle ()
 
 testPoolPath ()
 
 testPoolQuestionCount ()
 
 testOriginalTaxonomyFilter ()
 
 testMappedTaxonomyFilter ()
 
 testTypeFilter ()
 
 testLifecycleFilter ()
 
 testQuestionAmount ()
 
 testSequencePosition ()
 

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

ilTestRandomQuestionSetSourcePoolDefinition $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 ilTestRandomQuestionSetSourcePoolDefinitionTest

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

Definition at line 25 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

Member Function Documentation

◆ setUp()

ilTestRandomQuestionSetSourcePoolDefinitionTest::setUp ( )
protected

Definition at line 29 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

29  : void
30  {
31  parent::setUp();
32 
34  $this->createMock(ilDBInterface::class),
35  $this->createMock(ilObjTest::class)
36  );
37  }

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionSetSourcePoolDefinitionTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 39 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

39  : void
40  {
41  $this->assertInstanceOf(ilTestRandomQuestionSetSourcePoolDefinition::class, $this->testObj);
42  }

◆ testId()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testId ( )

Definition at line 44 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

44  : void
45  {
46  $this->testObj->setId(125);
47  $this->assertEquals(125, $this->testObj->getId());
48  }

◆ testLifecycleFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testLifecycleFilter ( )

Definition at line 105 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

105  : void
106  {
107  $expected = [
108  "test",
109  "hello",
110  "world"
111  ];
112  $this->testObj->setLifecycleFilter($expected);
113  $this->assertEquals($expected, $this->testObj->getLifecycleFilter());
114  }

◆ testMappedTaxonomyFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testMappedTaxonomyFilter ( )

Definition at line 84 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

84  : void
85  {
86  $expected = [
87  125 => ["nodeId" => 20],
88  17 => ["nodeId" => 3],
89  ];
90  $this->testObj->setMappedTaxonomyFilter($expected);
91  $this->assertEquals($expected, $this->testObj->getMappedTaxonomyFilter());
92  }

◆ testOriginalTaxonomyFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testOriginalTaxonomyFilter ( )

Definition at line 74 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

74  : void
75  {
76  $expected = [
77  125 => ["nodeId" => 20],
78  17 => ["nodeId" => 3],
79  ];
80  $this->testObj->setOriginalTaxonomyFilter($expected);
81  $this->assertEquals($expected, $this->testObj->getOriginalTaxonomyFilter());
82  }

◆ testPoolId()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolId ( )

Definition at line 50 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

50  : void
51  {
52  $this->testObj->setPoolId(125);
53  $this->assertEquals(125, $this->testObj->getPoolId());
54  }

◆ testPoolPath()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolPath ( )

Definition at line 62 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

62  : void
63  {
64  $this->testObj->setPoolPath("test");
65  $this->assertEquals("test", $this->testObj->getPoolPath());
66  }

◆ testPoolQuestionCount()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolQuestionCount ( )

Definition at line 68 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

68  : void
69  {
70  $this->testObj->setPoolQuestionCount(5);
71  $this->assertEquals(5, $this->testObj->getPoolQuestionCount());
72  }

◆ testPoolTitle()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolTitle ( )

Definition at line 56 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

56  : void
57  {
58  $this->testObj->setPoolTitle("test");
59  $this->assertEquals("test", $this->testObj->getPoolTitle());
60  }

◆ testQuestionAmount()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testQuestionAmount ( )

Definition at line 116 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

116  : void
117  {
118  $this->testObj->setQuestionAmount(5);
119  $this->assertEquals(5, $this->testObj->getQuestionAmount());
120  }

◆ testSequencePosition()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testSequencePosition ( )

Definition at line 122 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

122  : void
123  {
124  $this->testObj->setSequencePosition(5);
125  $this->assertEquals(5, $this->testObj->getSequencePosition());
126  }

◆ testTypeFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testTypeFilter ( )

Definition at line 94 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

94  : void
95  {
96  $expected = [
97  "test",
98  "hello",
99  "world"
100  ];
101  $this->testObj->setTypeFilter($expected);
102  $this->assertEquals($expected, $this->testObj->getTypeFilter());
103  }

Field Documentation

◆ $testObj

ilTestRandomQuestionSetSourcePoolDefinition ilTestRandomQuestionSetSourcePoolDefinitionTest::$testObj
private

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