19 declare(strict_types=1);
29 protected function setUp(): void
38 $this->assertInstanceOf(ilTestParticipantScoring::class, $this->testObj);
44 $this->testObj->setActiveId($activeId);
45 $this->assertEquals($activeId, $this->testObj->getActiveId());
51 $this->testObj->setScoredPass($scoredPass);
52 $this->assertEquals($scoredPass, $this->testObj->getScoredPass());
57 $answeredQuestions = 210;
58 $this->testObj->setAnsweredQuestions($answeredQuestions);
59 $this->assertEquals($answeredQuestions, $this->testObj->getAnsweredQuestions());
64 $totalQuestions = 210;
65 $this->testObj->setTotalQuestions($totalQuestions);
66 $this->assertEquals($totalQuestions, $this->testObj->getTotalQuestions());
72 $this->testObj->setReachedPoints($reachedPoints);
73 $this->assertEquals($reachedPoints, $this->testObj->getReachedPoints());
79 $this->testObj->setMaxPoints($maxPoints);
80 $this->assertEquals($maxPoints, $this->testObj->getMaxPoints());
85 $this->testObj->setPassed(
false);
86 $this->assertFalse($this->testObj->isPassed());
88 $this->testObj->setPassed(
true);
89 $this->assertTrue($this->testObj->isPassed());
94 $finalMark =
'testString';
95 $this->testObj->setFinalMark($finalMark);
96 $this->assertEquals($finalMark, $this->testObj->getFinalMark());
101 $this->assertEquals(0, $this->testObj->getPercentResult());
105 $this->testObj->setMaxPoints($maxPoints);
106 $this->testObj->setReachedPoints($reachedPoints);
107 $this->assertEquals($reachedPoints / $maxPoints, $this->testObj->getPercentResult());
test_instantiateObject_shouldReturnInstance()
ilTestParticipantScoring $testObj
Class ilTestParticipantScoringTest.