ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
assKprimChoiceTest.php
Go to the documentation of this file.
1<?php
2
27{
28 protected $backupGlobals = false;
29
30 protected function setUp(): void
31 {
32 parent::setUp();
33 $this->setGlobalVariable('ilias', $this->getIliasMock());
34 }
35
37 {
38 $instance = new assKprimChoice();
39 $this->assertInstanceOf('assKprimChoice', $instance);
40 }
41
43 {
44 $obj = new assKprimChoice();
45 $this->assertEquals('assKprimChoice', $obj->getQuestionType());
46 }
47
49 {
50 $obj = new assKprimChoice();
51 $this->assertEquals('qpl_qst_kprim', $obj->getAdditionalTableName());
52 }
53
55 {
56 $obj = new assKprimChoice();
57 $this->assertEquals('qpl_a_kprim', $obj->getAnswerTableName());
58 }
59
61 {
62 $obj = new assKprimChoice();
63 $this->assertEquals(false, $obj->isValidOptionLabel('not valid'));
64 $this->assertEquals(true, $obj->isValidOptionLabel($obj::OPTION_LABEL_RIGHT_WRONG));
65 }
66
68 {
69 $obj = new assKprimChoice();
70 $this->assertEquals(false, $obj->isValidAnswerType('not valid'));
71 $this->assertEquals(true, $obj->isValidAnswerType($obj::ANSWER_TYPE_SINGLE_LINE));
72 }
73}
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)