ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
TestSetupAgent.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Test\Setup
;
22
23
use
ILIAS\Setup\Agent\NullAgent
;
24
use
ILIAS\Setup\Objective
;
25
use
ILIAS\Setup\ObjectiveCollection
;
26
use
ILIAS\Setup\Metrics\Storage
;
27
use
ILIAS\Setup\Config
;
28
use
ILIAS\Setup\Objective\NullObjective
;
29
use ILIAS\Setup\Agent\HasNoNamedObjective;
30
use
ILIAS\Refinery\Transformation
;
31
32
class
TestSetupAgent
extends
NullAgent
33
{
34
use HasNoNamedObjective;
35
36
public
function
getUpdateObjective
(?
Config
$config =
null
):
Objective
37
{
38
return
new
ObjectiveCollection
(
39
'Database is updated for ILIAS\Test'
,
40
false
,
41
new
\
ilDatabaseUpdateStepsExecutedObjective
(
42
new
Test9DBUpdateSteps
()
43
),
44
new
\
ilDatabaseUpdateStepsExecutedObjective
(
45
new
Test10DBUpdateSteps
()
46
),
47
new
\
ilAccessCustomRBACOperationAddedObjective
(
48
'tst_history_read'
,
49
'View History in Tests'
,
50
'object'
,
51
7200,
52
[
'tst'
]
53
),
54
new
\
ilAccessRBACOperationDeletedObjective
(
'tst'
, 56),
55
new
\
ilDatabaseUpdateStepsExecutedObjective
(
56
new
ilTestNoHintsDBUpdateSteps
()
57
),
58
new
\
ilAccessCustomRBACOperationAddedObjective
(
59
'score_anon'
,
60
'Score Pseudonymously'
,
61
'object'
,
62
5000,
63
[
'tst'
]
64
),
65
);
66
}
67
68
public
function
getStatusObjective
(
Storage
$storage):
Objective
69
{
70
return
new
ObjectiveCollection
(
71
'ILIAS\Test'
,
72
true
,
73
new
\
ilDatabaseUpdateStepsMetricsCollectedObjective
(
74
$storage,
75
new
Test9DBUpdateSteps
()
76
),
77
new
\
ilDatabaseUpdateStepsMetricsCollectedObjective
(
78
$storage,
79
new
Test10DBUpdateSteps
()
80
),
81
new
\
ilDatabaseUpdateStepsMetricsCollectedObjective
(
82
$storage,
83
new
ilTestNoHintsDBUpdateSteps
()
84
),
85
);
86
}
87
88
public
function
hasConfig
(): bool
89
{
90
return
false
;
91
}
92
93
public
function
getArrayToConfigTransformation
():
Transformation
94
{
95
throw
new \LogicException(
"Agent has no config."
);
96
}
97
98
public
function
getInstallObjective
(?
Config
$config =
null
):
Objective
99
{
100
return
new
NullObjective
();
101
}
102
103
public
function
getBuildObjective
():
Objective
104
{
105
return
new
NullObjective
();
106
}
107
108
public
function
getMigrations
(): array
109
{
110
return
[
111
new
CloneIntroductionAndClosingRemarksMigration
()
112
];
113
}
114
}
ILIAS\Setup\Agent\NullAgent
An agent that just doesn't do a thing.
Definition:
NullAgent.php:35
ILIAS\Setup\ObjectiveCollection
A objective collection is a objective that is achieved once all subobjectives are achieved.
Definition:
ObjectiveCollection.php:27
ILIAS\Setup\Objective\NullObjective
A non-objective, nothing to do to achieve it...
Definition:
NullObjective.php:29
ILIAS\Test\Setup\CloneIntroductionAndClosingRemarksMigration
Definition:
CloneIntroductionAndClosingRemarksMigration.php:28
ILIAS\Test\Setup\Test10DBUpdateSteps
Definition:
Test10DBUpdateSteps.php:28
ILIAS\Test\Setup\Test9DBUpdateSteps
Definition:
Test9DBUpdateSteps.php:24
ILIAS\Test\Setup\TestSetupAgent
Definition:
TestSetupAgent.php:33
ILIAS\Test\Setup\TestSetupAgent\getBuildObjective
getBuildObjective()
@inheritdocs
Definition:
TestSetupAgent.php:103
ILIAS\Test\Setup\TestSetupAgent\getStatusObjective
getStatusObjective(Storage $storage)
Definition:
TestSetupAgent.php:68
ILIAS\Test\Setup\TestSetupAgent\getUpdateObjective
getUpdateObjective(?Config $config=null)
@inheritdocs
Definition:
TestSetupAgent.php:36
ILIAS\Test\Setup\TestSetupAgent\getArrayToConfigTransformation
getArrayToConfigTransformation()
@inheritdocs
Definition:
TestSetupAgent.php:93
ILIAS\Test\Setup\TestSetupAgent\getMigrations
getMigrations()
@inheritDoc
Definition:
TestSetupAgent.php:108
ILIAS\Test\Setup\TestSetupAgent\hasConfig
hasConfig()
@inheritdocs
Definition:
TestSetupAgent.php:88
ILIAS\Test\Setup\TestSetupAgent\getInstallObjective
getInstallObjective(?Config $config=null)
@inheritdocs
Definition:
TestSetupAgent.php:98
ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps
Definition:
class.ilTestNoHintsDBUpdateSteps.php:24
ilAccessCustomRBACOperationAddedObjective
Definition:
class.ilAccessCustomRBACOperationAddedObjective.php:26
ilAccessRBACOperationDeletedObjective
Definition:
class.ilAccessRBACOperationDeletedObjective.php:25
ilDatabaseUpdateStepsExecutedObjective
This class attempt to achieve a set of database update steps.
Definition:
class.ilDatabaseUpdateStepsExecutedObjective.php:28
ilDatabaseUpdateStepsMetricsCollectedObjective
Definition:
class.ilDatabaseUpdateStepsMetricsCollectedObjective.php:27
ILIAS\Refinery\Transformation
A transformation is a function from one datatype to another.
Definition:
Transformation.php:35
ILIAS\Setup\Config
A configuration for the setup.
Definition:
Config.php:27
ILIAS\Setup\Metrics\Storage
Definition:
Storage.php:24
ILIAS\Setup\Objective
An objective is a desired state of the system that is supposed to be created by the setup.
Definition:
Objective.php:31
ILIAS\Setup\Objective
Definition:
AdminConfirmedObjective.php:21
ILIAS\Test\Setup
Definition:
class.ilTestNoHintsDBUpdateSteps.php:21
components
ILIAS
Test
src
Setup
TestSetupAgent.php
Generated on Sat Oct 18 2025 23:04:32 for ILIAS by
1.9.4 (using
Doxyfile
)