ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
ClassificationSessionRepositoryTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use PHPUnit\Framework\TestCase;
22
23
class
ClassificationSessionRepositoryTest
extends
TestCase
24
{
25
protected \ILIAS\Container\Classification\ClassificationSessionRepository
$repo
;
26
27
protected
function
setUp
(): void
28
{
29
parent::setUp();
30
$this->repo = new \ILIAS\Container\Classification\ClassificationSessionRepository(14);
31
}
32
33
protected
function
tearDown
(): void
34
{
35
}
36
37
public
function
testValueForProvider
(): void
38
{
39
$repo
=
$this->repo
;
40
$repo
->setValueForProvider(
"prov"
, [1, 2, 3]);
41
$this->assertEquals(
42
[1, 2, 3],
43
$repo
->getValueForProvider(
"prov"
)
44
);
45
}
46
47
public
function
testUnsetAll
(): void
48
{
49
$repo
=
$this->repo
;
50
$repo
->setValueForProvider(
"prov"
, [1, 2, 3]);
51
$repo
->unsetAll();
52
$this->assertEquals(
53
[],
54
$repo
->getValueForProvider(
"prov"
)
55
);
56
}
57
58
public
function
testUnsetValueForProvider
(): void
59
{
60
$repo
=
$this->repo
;
61
$repo
->setValueForProvider(
"prov1"
, [1, 2, 3]);
62
$repo
->setValueForProvider(
"prov2"
, [3, 4, 5]);
63
$repo
->unsetValueForProvider(
"prov1"
);
64
$this->assertEquals(
65
[],
66
$repo
->getValueForProvider(
"prov1"
)
67
);
68
$this->assertEquals(
69
[3, 4, 5],
70
$repo
->getValueForProvider(
"prov2"
)
71
);
72
}
73
}
ClassificationSessionRepositoryTest
Definition:
ClassificationSessionRepositoryTest.php:24
ClassificationSessionRepositoryTest\testUnsetValueForProvider
testUnsetValueForProvider()
Definition:
ClassificationSessionRepositoryTest.php:58
ClassificationSessionRepositoryTest\$repo
ILIAS Container Classification ClassificationSessionRepository $repo
Definition:
ClassificationSessionRepositoryTest.php:25
ClassificationSessionRepositoryTest\setUp
setUp()
Definition:
ClassificationSessionRepositoryTest.php:27
ClassificationSessionRepositoryTest\testValueForProvider
testValueForProvider()
Definition:
ClassificationSessionRepositoryTest.php:37
ClassificationSessionRepositoryTest\tearDown
tearDown()
Definition:
ClassificationSessionRepositoryTest.php:33
ClassificationSessionRepositoryTest\testUnsetAll
testUnsetAll()
Definition:
ClassificationSessionRepositoryTest.php:47
components
ILIAS
Container
tests
Classification
ClassificationSessionRepositoryTest.php
Generated on Sat Oct 18 2025 23:02:49 for ILIAS by
1.9.4 (using
Doxyfile
)