ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMapGUITest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
23class ilMapGUITest extends TestCase
24{
25 protected ilMapGUI $gui;
26
27 protected function setUp(): void
28 {
29 $this->gui = new class () extends ilMapGUI {
30 public function __construct()
31 {
32 }
33
34 public function getHtml(): string
35 {
36 }
37
38 public function getUserListHtml(): string
39 {
40 }
41 };
42 }
43
44 #[\PHPUnit\Framework\Attributes\DataProvider('properties')]
45 public function testSettersAndGetters($name, $value): void
46 {
47 $set = "set$name";
48 $get = "get$name";
49 $this->gui->$set($value);
50 $this->assertEquals($value, $this->gui->$get());
51 }
52
53 public static function properties(): array
54 {
55 return [
56 ["MapId", "a_map_id"],
57 ["Width", "a_width"],
58 ["Height", "a_height"],
59 ["Latitude", "a_latitude"],
60 ["Longitude", "a_longitude"],
61 ["Zoom", 50],
62 ["EnableTypeControl", true],
63 ["EnableNavigationControl", false],
64 ["EnableUpdateListener", true],
65 ["EnableLargeMapControl", false],
66 ["EnableCentralMarker", true]
67 ];
68 }
69}
ilMapGUI $gui
static properties()
testSettersAndGetters($name, $value)
User interface class for maps.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc