ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
ImageMapEditSessionRepositoryTest.php
Go to the documentation of this file.
1
<?php
2
19
use
PHPUnit\Framework\TestCase
;
20
26
class
ImageMapEditSessionRepositoryTest
extends
TestCase
27
{
28
//protected $backupGlobals = false;
29
protected \ILIAS\MediaObjects\ImageMap\ImageMapEditSessionRepository
$repo
;
30
31
protected
function
setUp
(): void
32
{
33
parent::setUp();
34
$this->repo = new \ILIAS\MediaObjects\ImageMap\ImageMapEditSessionRepository();
35
$this->repo->clear();
36
}
37
38
protected
function
tearDown
(): void
39
{
40
}
41
45
public
function
testClear
(): void
46
{
47
$repo =
$this->repo
;
48
49
$repo->setCoords(
"1,2,3"
);
50
$repo->setAreaNr(4);
51
$repo->setLinkType(
"int"
);
52
$repo->clear();
53
$this->assertEquals(
54
""
,
55
$repo->getCoords()
56
);
57
$this->assertEquals(
58
0,
59
$repo->getAreaNr()
60
);
61
$this->assertEquals(
62
""
,
63
$repo->getLinkType()
64
);
65
}
66
67
public
function
testTargetScript
(): void
68
{
69
$repo =
$this->repo
;
70
$repo->setTargetScript(
"ilias.php?a=1"
);
71
$this->assertEquals(
72
"ilias.php?a=1"
,
73
$repo->getTargetScript()
74
);
75
}
76
77
public
function
testLinkType
(): void
78
{
79
$repo =
$this->repo
;
80
$repo->setLinkType(
"ext"
);
81
$this->assertEquals(
82
"ext"
,
83
$repo->getLinkType()
84
);
85
}
86
87
public
function
testAreaNr
(): void
88
{
89
$repo =
$this->repo
;
90
$repo->setAreaNr(4);
91
$this->assertEquals(
92
4,
93
$repo->getAreaNr()
94
);
95
}
96
97
public
function
testCoords
(): void
98
{
99
$repo =
$this->repo
;
100
$repo->setCoords(
"7,8,9,2"
);
101
$this->assertEquals(
102
"7,8,9,2"
,
103
$repo->getCoords()
104
);
105
}
106
107
public
function
testAreaType
(): void
108
{
109
$repo =
$this->repo
;
110
$repo->setAreaType(
"Rect"
);
111
$this->assertEquals(
112
"Rect"
,
113
$repo->getAreaType()
114
);
115
}
116
117
public
function
testExternalLink
(): void
118
{
119
$repo =
$this->repo
;
120
$repo->setExternalLink(
"https://www.ilias.de"
);
121
$this->assertEquals(
122
"https://www.ilias.de"
,
123
$repo->getExternalLink()
124
);
125
}
126
}
ImageMapEditSessionRepositoryTest\$repo
ILIAS MediaObjects ImageMap ImageMapEditSessionRepository $repo
Definition:
ImageMapEditSessionRepositoryTest.php:29
ImageMapEditSessionRepositoryTest\setUp
setUp()
Definition:
ImageMapEditSessionRepositoryTest.php:31
ImageMapEditSessionRepositoryTest\testExternalLink
testExternalLink()
Definition:
ImageMapEditSessionRepositoryTest.php:117
ImageMapEditSessionRepositoryTest
Test clipboard repository.
Definition:
ImageMapEditSessionRepositoryTest.php:26
ImageMapEditSessionRepositoryTest\testCoords
testCoords()
Definition:
ImageMapEditSessionRepositoryTest.php:97
ImageMapEditSessionRepositoryTest\testLinkType
testLinkType()
Definition:
ImageMapEditSessionRepositoryTest.php:77
ImageMapEditSessionRepositoryTest\tearDown
tearDown()
Definition:
ImageMapEditSessionRepositoryTest.php:38
ImageMapEditSessionRepositoryTest\testAreaNr
testAreaNr()
Definition:
ImageMapEditSessionRepositoryTest.php:87
ImageMapEditSessionRepositoryTest\testTargetScript
testTargetScript()
Definition:
ImageMapEditSessionRepositoryTest.php:67
ImageMapEditSessionRepositoryTest\testAreaType
testAreaType()
Definition:
ImageMapEditSessionRepositoryTest.php:107
ImageMapEditSessionRepositoryTest\testClear
testClear()
Test clear.
Definition:
ImageMapEditSessionRepositoryTest.php:45
TestCase
TestCase
components
ILIAS
MediaObjects
tests
ImageMapEditSessionRepositoryTest.php
Generated on Wed Sep 3 2025 23:03:26 for ILIAS by
1.8.13 (using
Doxyfile
)