ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
EditorEditSessionRepositoryTest.php
Go to the documentation of this file.
1
<?php
2
19
use PHPUnit\Framework\TestCase;
20
26
class
EditorEditSessionRepositoryTest
extends
TestCase
27
{
28
//protected $backupGlobals = false;
29
protected \ILIAS\COPage\Editor\EditSessionRepository
$repo
;
30
31
protected
function
setUp
(): void
32
{
33
parent::setUp();
34
$this->repo = new \ILIAS\COPage\Editor\EditSessionRepository();
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
$repo
->setPageError(
"page_error"
);
49
$repo
->setSubCmd(
"sub_cmd"
);
50
$repo
->setQuestionPool(4);
51
$repo
->setTextLang(10,
"en"
);
52
$repo
->setMediaPool(5);
53
$repo
->clear([10]);
54
$this->assertEquals(
55
"00"
,
56
$repo
->getPageError() .
57
$repo
->getSubCmd() .
58
$repo
->getTextLang(4) .
59
$repo
->getMediaPool() .
60
$repo
->getQuestionPool()
61
);
62
}
63
67
public
function
testPageError
(): void
68
{
69
$repo
=
$this->repo
;
70
$repo
->setPageError(
"page_error"
);
71
$this->assertEquals(
72
"page_error"
,
73
$repo
->getPageError()
74
);
75
}
76
80
public
function
testSubCmd
(): void
81
{
82
$repo
=
$this->repo
;
83
$repo
->setSubCmd(
"sub"
);
84
$this->assertEquals(
85
"sub"
,
86
$repo
->getSubCmd()
87
);
88
}
89
93
public
function
testQuestionPool
(): void
94
{
95
$repo
=
$this->repo
;
96
$repo
->setQuestionPool(15);
97
$this->assertEquals(
98
15,
99
$repo
->getQuestionPool()
100
);
101
}
102
106
public
function
testMediaPool
(): void
107
{
108
$repo
=
$this->repo
;
109
$repo
->setMediaPool(12);
110
$this->assertEquals(
111
12,
112
$repo
->getMediaPool()
113
);
114
}
115
119
public
function
testTextLang
(): void
120
{
121
$repo
=
$this->repo
;
122
$repo
->setTextLang(17,
"fr"
);
123
$this->assertEquals(
124
"fr"
,
125
$repo
->getTextLang(17)
126
);
127
}
128
}
EditorEditSessionRepositoryTest
Test clipboard repository.
Definition:
EditorEditSessionRepositoryTest.php:27
EditorEditSessionRepositoryTest\$repo
ILIAS COPage Editor EditSessionRepository $repo
Definition:
EditorEditSessionRepositoryTest.php:29
EditorEditSessionRepositoryTest\setUp
setUp()
Definition:
EditorEditSessionRepositoryTest.php:31
EditorEditSessionRepositoryTest\testPageError
testPageError()
Test page error.
Definition:
EditorEditSessionRepositoryTest.php:67
EditorEditSessionRepositoryTest\testQuestionPool
testQuestionPool()
Test question pool.
Definition:
EditorEditSessionRepositoryTest.php:93
EditorEditSessionRepositoryTest\testClear
testClear()
Test clear.
Definition:
EditorEditSessionRepositoryTest.php:45
EditorEditSessionRepositoryTest\testTextLang
testTextLang()
Test text lang.
Definition:
EditorEditSessionRepositoryTest.php:119
EditorEditSessionRepositoryTest\testSubCmd
testSubCmd()
Test sub-command.
Definition:
EditorEditSessionRepositoryTest.php:80
EditorEditSessionRepositoryTest\tearDown
tearDown()
Definition:
EditorEditSessionRepositoryTest.php:38
EditorEditSessionRepositoryTest\testMediaPool
testMediaPool()
Test media pool.
Definition:
EditorEditSessionRepositoryTest.php:106
components
ILIAS
COPage
tests
EditorEditSessionRepositoryTest.php
Generated on Sat Oct 18 2025 23:02:52 for ILIAS by
1.9.4 (using
Doxyfile
)