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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testApplicantId ()
 
 testRequiredAmount ()
 
 testHasRequiredAmountLeft ()
 
 testDecrementRequiredAmount ()
 
 testHasQuestion ()
 
 testGetQuestion ()
 

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

ilTestRandomQuestionCollectionSubsetApplication $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 ilTestRandomQuestionCollectionSubsetApplicationTest

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

Definition at line 25 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

Member Function Documentation

◆ setUp()

ilTestRandomQuestionCollectionSubsetApplicationTest::setUp ( )
protected

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionCollectionSubsetApplicationTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

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

◆ testApplicantId()

ilTestRandomQuestionCollectionSubsetApplicationTest::testApplicantId ( )

Definition at line 41 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

41  : void
42  {
43  $this->testObj->setApplicantId(12);
44  $this->assertEquals(12, $this->testObj->getApplicantId());
45  }

◆ testDecrementRequiredAmount()

ilTestRandomQuestionCollectionSubsetApplicationTest::testDecrementRequiredAmount ( )

Definition at line 65 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

65  : void
66  {
67  $this->testObj->setRequiredAmount(5);
68  $this->testObj->decrementRequiredAmount();
69  $this->assertEquals(4, $this->testObj->getRequiredAmount());
70  }

◆ testGetQuestion()

ilTestRandomQuestionCollectionSubsetApplicationTest::testGetQuestion ( )

Definition at line 83 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

83  : void
84  {
85  $question = new ilTestRandomQuestionSetQuestion();
86  $question->setQuestionId(2);
87  $this->testObj->addQuestion($question);
88 
89  $this->assertEquals($question, $this->testObj->getQuestion(2));
90  }

◆ testHasQuestion()

ilTestRandomQuestionCollectionSubsetApplicationTest::testHasQuestion ( )

Definition at line 72 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

72  : void
73  {
74  $this->assertFalse($this->testObj->hasQuestion(2));
75 
76  $question = new ilTestRandomQuestionSetQuestion();
77  $question->setQuestionId(2);
78 
79  $this->testObj->addQuestion($question);
80  $this->assertTrue($this->testObj->hasQuestion(2));
81  }

◆ testHasRequiredAmountLeft()

ilTestRandomQuestionCollectionSubsetApplicationTest::testHasRequiredAmountLeft ( )

Definition at line 53 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

53  : void
54  {
55  $this->testObj->setRequiredAmount(5);
56  $this->assertTrue($this->testObj->hasRequiredAmountLeft());
57 
58  $this->testObj->setRequiredAmount(-200);
59  $this->assertFalse($this->testObj->hasRequiredAmountLeft());
60 
61  $this->testObj->setRequiredAmount(0);
62  $this->assertFalse($this->testObj->hasRequiredAmountLeft());
63  }

◆ testRequiredAmount()

ilTestRandomQuestionCollectionSubsetApplicationTest::testRequiredAmount ( )

Definition at line 47 of file ilTestRandomQuestionCollectionSubsetApplicationTest.php.

47  : void
48  {
49  $this->testObj->setRequiredAmount(12);
50  $this->assertEquals(12, $this->testObj->getRequiredAmount());
51  }

Field Documentation

◆ $testObj

ilTestRandomQuestionCollectionSubsetApplication ilTestRandomQuestionCollectionSubsetApplicationTest::$testObj
private

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