ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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(__DIR__ . '/../../../../');
33  }
34 
35  public function test_instantiateObjectSimple(): void
36  {
37  $instance = new ASS_AnswerImagemap();
38 
39  $this->assertInstanceOf(ASS_AnswerImagemap::class, $instance);
40  }
41 
42  public function test_setGetCoords(): void
43  {
44  $instance = new ASS_AnswerImagemap();
45 
46  $expected = '12345';
47  $instance->setCoords($expected);
48  $actual = $instance->getCoords();
49 
50  $this->assertEquals($expected, $actual);
51  }
52 
53  public function test_setGetArea(): void
54  {
55  $instance = new ASS_AnswerImagemap();
56 
57  $expected = '12345';
58  $instance->setArea($expected);
59  $actual = $instance->getArea();
60 
61  $this->assertEquals($expected, $actual);
62  }
63 
64  public function test_setGetPointsUnchecked(): void
65  {
66  $instance = new ASS_AnswerImagemap();
67 
68  $expected = '12345';
69  $instance->setPointsUnchecked($expected);
70  $actual = $instance->getPointsUnchecked();
71 
72  $this->assertEquals($expected, $actual);
73  }
74 
76  {
77  $instance = new ASS_AnswerImagemap();
78 
79  $expected = 0.0;
80  $instance->setPointsUnchecked('Günther');
81  $actual = $instance->getPointsUnchecked();
82 
83  $this->assertEquals($expected, $actual);
84  }
85 }
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()