3 declare(strict_types=1);
29 protected function setUp(): void
38 $this->assertInstanceOf(ilTestRandomQuestionCollectionSubsetApplication::class, $this->testObj);
43 $this->testObj->setApplicantId(12);
44 $this->assertEquals(12, $this->testObj->getApplicantId());
49 $this->testObj->setRequiredAmount(12);
50 $this->assertEquals(12, $this->testObj->getRequiredAmount());
55 $this->testObj->setRequiredAmount(5);
56 $this->assertTrue($this->testObj->hasRequiredAmountLeft());
58 $this->testObj->setRequiredAmount(-200);
59 $this->assertFalse($this->testObj->hasRequiredAmountLeft());
61 $this->testObj->setRequiredAmount(0);
62 $this->assertFalse($this->testObj->hasRequiredAmountLeft());
67 $this->testObj->setRequiredAmount(5);
68 $this->testObj->decrementRequiredAmount();
69 $this->assertEquals(4, $this->testObj->getRequiredAmount());
74 $this->assertFalse($this->testObj->hasQuestion(2));
77 $question->setQuestionId(2);
79 $this->testObj->addQuestion($question);
80 $this->assertTrue($this->testObj->hasQuestion(2));
86 $question->setQuestionId(2);
87 $this->testObj->addQuestion($question);
89 $this->assertEquals($question, $this->testObj->getQuestion(2));
ilTestRandomQuestionCollectionSubsetApplication $testObj
testHasRequiredAmountLeft()
testDecrementRequiredAmount()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
test_instantiateObject_shouldReturnInstance()