ILIAS
release_8 Revision v8.24
◀ ilDoc Overview
EditorEditSessionRepositoryTest.php
Go to the documentation of this file.
1
<?php
2
3
use PHPUnit\Framework\TestCase;
4
10
class
EditorEditSessionRepositoryTest
extends
TestCase
11
{
12
//protected $backupGlobals = false;
13
protected \ILIAS\COPage\Editor\EditSessionRepository
$repo
;
14
15
protected
function
setUp
(): void
16
{
17
parent::setUp();
18
$this->repo = new \ILIAS\COPage\Editor\EditSessionRepository();
19
$this->repo->clear();
20
}
21
22
protected
function
tearDown
(): void
23
{
24
}
25
29
public
function
testClear
(): void
30
{
31
$repo
=
$this->repo
;
32
$repo
->setPageError(
"page_error"
);
33
$repo
->setSubCmd(
"sub_cmd"
);
34
$repo
->setQuestionPool(4);
35
$repo
->setTextLang(10,
"en"
);
36
$repo
->setMediaPool(5);
37
$repo
->clear([10]);
38
$this->assertEquals(
39
"00"
,
40
$repo
->getPageError() .
41
$repo
->getSubCmd() .
42
$repo
->getTextLang(4) .
43
$repo
->getMediaPool() .
44
$repo
->getQuestionPool()
45
);
46
}
47
51
public
function
testPageError
(): void
52
{
53
$repo
=
$this->repo
;
54
$repo
->setPageError(
"page_error"
);
55
$this->assertEquals(
56
"page_error"
,
57
$repo
->getPageError()
58
);
59
}
60
64
public
function
testSubCmd
(): void
65
{
66
$repo
=
$this->repo
;
67
$repo
->setSubCmd(
"sub"
);
68
$this->assertEquals(
69
"sub"
,
70
$repo
->getSubCmd()
71
);
72
}
73
77
public
function
testQuestionPool
(): void
78
{
79
$repo
=
$this->repo
;
80
$repo
->setQuestionPool(15);
81
$this->assertEquals(
82
15,
83
$repo
->getQuestionPool()
84
);
85
}
86
90
public
function
testMediaPool
(): void
91
{
92
$repo
=
$this->repo
;
93
$repo
->setMediaPool(12);
94
$this->assertEquals(
95
12,
96
$repo
->getMediaPool()
97
);
98
}
99
103
public
function
testTextLang
(): void
104
{
105
$repo
=
$this->repo
;
106
$repo
->setTextLang(17,
"fr"
);
107
$this->assertEquals(
108
"fr"
,
109
$repo
->getTextLang(17)
110
);
111
}
112
}
EditorEditSessionRepositoryTest
Test clipboard repository.
Definition:
EditorEditSessionRepositoryTest.php:11
EditorEditSessionRepositoryTest\$repo
ILIAS COPage Editor EditSessionRepository $repo
Definition:
EditorEditSessionRepositoryTest.php:13
EditorEditSessionRepositoryTest\setUp
setUp()
Definition:
EditorEditSessionRepositoryTest.php:15
EditorEditSessionRepositoryTest\testPageError
testPageError()
Test page error.
Definition:
EditorEditSessionRepositoryTest.php:51
EditorEditSessionRepositoryTest\testQuestionPool
testQuestionPool()
Test question pool.
Definition:
EditorEditSessionRepositoryTest.php:77
EditorEditSessionRepositoryTest\testClear
testClear()
Test clear.
Definition:
EditorEditSessionRepositoryTest.php:29
EditorEditSessionRepositoryTest\testTextLang
testTextLang()
Test text lang.
Definition:
EditorEditSessionRepositoryTest.php:103
EditorEditSessionRepositoryTest\testSubCmd
testSubCmd()
Test sub-command.
Definition:
EditorEditSessionRepositoryTest.php:64
EditorEditSessionRepositoryTest\tearDown
tearDown()
Definition:
EditorEditSessionRepositoryTest.php:22
EditorEditSessionRepositoryTest\testMediaPool
testMediaPool()
Test media pool.
Definition:
EditorEditSessionRepositoryTest.php:90
Services
COPage
test
EditorEditSessionRepositoryTest.php
Generated on Mon Nov 3 2025 22:01:47 for ILIAS by
1.9.4 (using
Doxyfile
)