4use PHPUnit\Framework\TestCase;
23 protected function setUp() : void
25 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
26 require_once
'./Services/PHPUnit/classes/class.ilUnitUtil.php';
27 ilUnitUtil::performInitialisation();
29 chdir(dirname(__FILE__));
34 require_once
'./Modules/Test/classes/class.assMark.php';
45 $this->ass_mark->setShortName($expected);
48 $actual = $this->ass_mark->getShortName();
54 "Get/Set on shortName failed, in/out not matching."
65 $this->ass_mark->setPassed($expected);
68 $actual = $this->ass_mark->getPassed();
74 "Get/Set on passed failed, in/out not matching."
84 $expected =
"Esther The Tester";
85 $this->ass_mark->setOfficialName($expected);
88 $actual = $this->ass_mark->getOfficialName();
94 "Get/Set on officialName failed, in/out not matching."
105 $this->ass_mark->setMinimumLevel($expected);
108 $actual = $this->ass_mark->getMinimumLevel();
114 "Get/Set on minimumLevel failed, in/out not matching."
134 $this->ass_mark->setMinimumLevel($expected);
137 $actual = $this->ass_mark->getMinimumLevel();
143 "Set low on minimumLevel failed, in/out not matching."
157 $this->ass_mark->setMinimumLevel($expected);
160 $actual = $this->ass_mark->getMinimumLevel();
166 "Set low on minimumLevel failed, in/out not matching."
178 $this->expectException(\Exception::class);
182 $this->ass_mark->setMinimumLevel($expected);
185 $actual = $this->ass_mark->getMinimumLevel();
A class defining marks for assessment test objects.
An exception for terminatinating execution or to throw for unit testing.
testGetSetOfficialName()
Basic Get/Set test on member officialName using accessor methods.
testSetMinimumLevel_Low()
Set test on member minimumLevel using accessor methods with a very low level.
testGetSetShortName()
Basic Get/Set test on member short name using accessor methods.
testSetMinimumLevel_TooLow()
Set test on member minimumLevel using accessor methods with a too low level.
testSetMinimumLevel_High()
Set test on member minimumLevel using accessor method with a high level.
testGetSetMinimumLevel()
Basic Get/Set test on member minimumLevel using accessor methods.
testGetSetPassed()
Basic Get/Set test on member passed using accessor methods.