ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
assAnswerMultipleResponseTest.php
Go to the documentation of this file.
1<?php
2
27{
28 protected $backupGlobals = false;
29
30 protected function setUp(): void
31 {
32 chdir(__DIR__ . '/../../../../');
33 }
34
35 public function test_instantiateObjectSimple(): void
36 {
37 $instance = new ASS_AnswerMultipleResponse();
38
39 $this->assertInstanceOf(ASS_AnswerMultipleResponse::class, $instance);
40 }
41
42 public function test_setGetPointsUnchecked(): void
43 {
44 $instance = new ASS_AnswerMultipleResponse();
45 $expected = 1;
46
47 $instance->setPointsUnchecked($expected);
48 $actual = $instance->getPointsUnchecked();
49
50 $this->assertEquals($expected, $actual);
51 }
52
54 {
55 $instance = new ASS_AnswerMultipleResponse();
56 $expected = 0;
57
58 $instance->setPointsUnchecked('Günther');
59 $actual = $instance->getPointsUnchecked();
60
61 $this->assertEquals($expected, $actual);
62 }
63
64 public function test_setGetPointsChecked(): void
65 {
66 $instance = new ASS_AnswerMultipleResponse();
67 $expected = 2;
68
69 $instance->setPointsChecked($expected);
70 $actual = $instance->getPointsChecked();
71
72 $this->assertEquals($expected, $actual);
73 }
74}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class assBaseTestCase.