ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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(dirname(__FILE__));
33  chdir('../../../');
34  }
35 
36  public function test_instantiateObjectSimple(): void
37  {
38  // Act
39  $instance = new ASS_AnswerMultipleResponse();
40 
41  // Assert
42  $this->assertInstanceOf('ASS_AnswerMultipleResponse', $instance);
43  }
44 
45  public function test_setGetPointsUnchecked(): void
46  {
47  $instance = new ASS_AnswerMultipleResponse();
48  $expected = 1;
49 
50  // Act
51  $instance->setPointsUnchecked($expected);
52  $actual = $instance->getPointsUnchecked();
53 
54  // Assert
55  $this->assertEquals($expected, $actual);
56  }
57 
59  {
60  $instance = new ASS_AnswerMultipleResponse();
61  $expected = 0;
62 
63  // Act
64  $instance->setPointsUnchecked('Günther');
65  $actual = $instance->getPointsUnchecked();
66 
67  // Assert
68  $this->assertEquals($expected, $actual);
69  }
70 
71  public function test_setGetPointsChecked(): void
72  {
73  $instance = new ASS_AnswerMultipleResponse();
74  $expected = 2;
75 
76  // Act
77  $instance->setPointsChecked($expected);
78  $actual = $instance->getPointsChecked();
79 
80  // Assert
81  $this->assertEquals($expected, $actual);
82  }
83 }
Class assBaseTestCase.
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...