ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
assAnswerImagemapTest.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_AnswerImagemap();
40 
41  // Assert
42  $this->assertInstanceOf('ASS_AnswerImagemap', $instance);
43  }
44 
45  public function test_setGetCoords(): void
46  {
47  $instance = new ASS_AnswerImagemap();
48 
49  // Act
50  $expected = "12345";
51  $instance->setCoords($expected);
52  $actual = $instance->getCoords();
53 
54  // Assert
55  $this->assertEquals($expected, $actual);
56  }
57 
58  public function test_setGetArea(): void
59  {
60  $instance = new ASS_AnswerImagemap();
61 
62  // Act
63  $expected = "12345";
64  $instance->setArea($expected);
65  $actual = $instance->getArea();
66 
67  // Assert
68  $this->assertEquals($expected, $actual);
69  }
70 
71  public function test_setGetPointsUnchecked(): void
72  {
73  $instance = new ASS_AnswerImagemap();
74 
75  // Act
76  $expected = "12345";
77  $instance->setPointsUnchecked($expected);
78  $actual = $instance->getPointsUnchecked();
79 
80  // Assert
81  $this->assertEquals($expected, $actual);
82  }
83 
85  {
86  $instance = new ASS_AnswerImagemap();
87 
88  // Act
89  $expected = 0.0;
90  $instance->setPointsUnchecked('Günther');
91  $actual = $instance->getPointsUnchecked();
92 
93  // Assert
94  $this->assertEquals($expected, $actual);
95  }
96 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
test_setGetPointsUnchecked_shouldNullifyOnNonNumericPoints()