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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testPoolsWithHomogeneousScoredQuestionsRequired ()
 
 testQuestionAmountConfigurationMode ()
 
 testQuestionAmountConfigurationModePerPool ()
 
 testQuestionAmountConfigurationModePerTest ()
 
 testIsValidQuestionAmountConfigurationMode ()
 
 testQuestionAmountPerTest ()
 
 testLastQuestionSyncTimestamp ()
 

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

ilTestRandomQuestionSetConfig $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 ilTestRandomQuestionSetConfigTest

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

Definition at line 25 of file ilTestRandomQuestionSetConfigTest.php.

Member Function Documentation

◆ setUp()

ilTestRandomQuestionSetConfigTest::setUp ( )
protected

Definition at line 29 of file ilTestRandomQuestionSetConfigTest.php.

29  : void
30  {
31  parent::setUp();
32 
33  $this->testObj = new ilTestRandomQuestionSetConfig(
34  $this->getMockBuilder(ilTree::class)->disableOriginalConstructor()->getMock(),
35  $this->createMock(ilDBInterface::class),
36  $this->createMock(ilComponentRepository::class),
37  $this->getMockBuilder(ilObjTest::class)->disableOriginalConstructor()->getMock()
38  );
39  }

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionSetConfigTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 41 of file ilTestRandomQuestionSetConfigTest.php.

41  : void
42  {
43  $this->assertInstanceOf(ilTestRandomQuestionSetConfig::class, $this->testObj);
44  }

◆ testIsValidQuestionAmountConfigurationMode()

ilTestRandomQuestionSetConfigTest::testIsValidQuestionAmountConfigurationMode ( )

Definition at line 79 of file ilTestRandomQuestionSetConfigTest.php.

References ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_POOL, and ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_TEST.

79  : void
80  {
81  $this->assertFalse($this->testObj->isValidQuestionAmountConfigurationMode(200));
82  $this->assertTrue($this->testObj->isValidQuestionAmountConfigurationMode(ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL));
83  $this->assertTrue($this->testObj->isValidQuestionAmountConfigurationMode(ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST));
84  }

◆ testLastQuestionSyncTimestamp()

ilTestRandomQuestionSetConfigTest::testLastQuestionSyncTimestamp ( )

Definition at line 92 of file ilTestRandomQuestionSetConfigTest.php.

92  : void
93  {
94  $this->testObj->setLastQuestionSyncTimestamp(222);
95  $this->assertEquals(222, $this->testObj->getLastQuestionSyncTimestamp());
96  }

◆ testPoolsWithHomogeneousScoredQuestionsRequired()

ilTestRandomQuestionSetConfigTest::testPoolsWithHomogeneousScoredQuestionsRequired ( )

Definition at line 46 of file ilTestRandomQuestionSetConfigTest.php.

46  : void
47  {
48  $this->testObj->setPoolsWithHomogeneousScoredQuestionsRequired(false);
49  $this->assertFalse($this->testObj->arePoolsWithHomogeneousScoredQuestionsRequired());
50 
51  $this->testObj->setPoolsWithHomogeneousScoredQuestionsRequired(true);
52  $this->assertTrue($this->testObj->arePoolsWithHomogeneousScoredQuestionsRequired());
53  }

◆ testQuestionAmountConfigurationMode()

ilTestRandomQuestionSetConfigTest::testQuestionAmountConfigurationMode ( )

Definition at line 55 of file ilTestRandomQuestionSetConfigTest.php.

55  : void
56  {
57  $this->testObj->setQuestionAmountConfigurationMode("test");
58  $this->assertEquals("test", $this->testObj->getQuestionAmountConfigurationMode());
59  }

◆ testQuestionAmountConfigurationModePerPool()

ilTestRandomQuestionSetConfigTest::testQuestionAmountConfigurationModePerPool ( )

Definition at line 61 of file ilTestRandomQuestionSetConfigTest.php.

References ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_POOL, and ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_TEST.

61  : void
62  {
63  $this->testObj->setQuestionAmountConfigurationMode(ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST);
64  $this->assertFalse($this->testObj->isQuestionAmountConfigurationModePerPool());
65 
66  $this->testObj->setQuestionAmountConfigurationMode(ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL);
67  $this->assertTrue($this->testObj->isQuestionAmountConfigurationModePerPool());
68  }

◆ testQuestionAmountConfigurationModePerTest()

ilTestRandomQuestionSetConfigTest::testQuestionAmountConfigurationModePerTest ( )

Definition at line 70 of file ilTestRandomQuestionSetConfigTest.php.

References ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_POOL, and ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_TEST.

70  : void
71  {
72  $this->testObj->setQuestionAmountConfigurationMode(ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL);
73  $this->assertFalse($this->testObj->isQuestionAmountConfigurationModePerTest());
74 
75  $this->testObj->setQuestionAmountConfigurationMode(ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST);
76  $this->assertTrue($this->testObj->isQuestionAmountConfigurationModePerTest());
77  }

◆ testQuestionAmountPerTest()

ilTestRandomQuestionSetConfigTest::testQuestionAmountPerTest ( )

Definition at line 86 of file ilTestRandomQuestionSetConfigTest.php.

86  : void
87  {
88  $this->testObj->setQuestionAmountPerTest(222);
89  $this->assertEquals(222, $this->testObj->getQuestionAmountPerTest());
90  }

Field Documentation

◆ $testObj

ilTestRandomQuestionSetConfig ilTestRandomQuestionSetConfigTest::$testObj
private

Definition at line 27 of file ilTestRandomQuestionSetConfigTest.php.


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