ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
assKprimChoiceTest.php
Go to the documentation of this file.
1<?php
26{
27 protected $backupGlobals = false;
28
29 protected function setUp(): void
30 {
31 parent::setUp();
32 $this->setGlobalVariable('ilias', $this->getIliasMock());
33 }
34
36 {
37 $instance = new assKprimChoice();
38 $this->assertInstanceOf('assKprimChoice', $instance);
39 }
40
42 {
43 $obj = new assKprimChoice();
44 $this->assertEquals('assKprimChoice', $obj->getQuestionType());
45 }
46
48 {
49 $obj = new assKprimChoice();
50 $this->assertEquals('qpl_qst_kprim', $obj->getAdditionalTableName());
51 }
52
54 {
55 $obj = new assKprimChoice();
56 $this->assertEquals('qpl_a_kprim', $obj->getAnswerTableName());
57 }
58
60 {
61 $obj = new assKprimChoice();
62 $this->assertEquals(false, $obj->isValidOptionLabel('not valid'));
63 $this->assertEquals(true, $obj->isValidOptionLabel($obj::OPTION_LABEL_RIGHT_WRONG));
64 }
65
67 {
68 $obj = new assKprimChoice();
69 $this->assertEquals(false, $obj->isValidAnswerType('not valid'));
70 $this->assertEquals(true, $obj->isValidAnswerType($obj::ANSWER_TYPE_SINGLE_LINE));
71 }
72}
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
test_getAnswerTableName_shouldReturnAnswerTableName()
test_getAdditionalTableName_shouldReturnAdditionalTableName()
setGlobalVariable(string $name, mixed $value)