ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ 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\ObjectiveCollection
A objective collection is a objective that is achieved once all subobjectives are achieved...
Definition:
ObjectiveCollection.php:26
Storage
ILIAS\GlobalScreen_\UI\Footer\Setup\Agent\NullAgent
An agent that just doesn't do a thing.
Definition:
NullAgent.php:34
ILIAS\Setup\Objective
An objective is a desired state of the system that is supposed to be created by the setup...
Definition:
Objective.php:30
ILIAS\Setup\Metrics\Storage
Definition:
Storage.php:23
ILIAS\Test\Setup\TestSetupAgent\getBuildObjective
getBuildObjective()
Definition:
TestSetupAgent.php:103
ilDatabaseUpdateStepsExecutedObjective
Config
ilDatabaseUpdateStepsMetricsCollectedObjective
ILIAS\Test\Setup
Definition:
class.ilTestNoHintsDBUpdateSteps.php:21
ILIAS\Test\Setup\TestSetupAgent\getArrayToConfigTransformation
getArrayToConfigTransformation()
Definition:
TestSetupAgent.php:93
HasNoNamedObjective
Transformation
ILIAS\Test\Setup\TestSetupAgent\hasConfig
hasConfig()
Definition:
TestSetupAgent.php:88
ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps
Definition:
class.ilTestNoHintsDBUpdateSteps.php:23
ILIAS\Setup\Objective\NullObjective
A non-objective, nothing to do to achieve it...
Definition:
NullObjective.php:28
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ILIAS\Test\Setup\TestSetupAgent
Definition:
TestSetupAgent.php:32
ilAccessRBACOperationDeletedObjective
Definition:
class.ilAccessRBACOperationDeletedObjective.php:24
ObjectiveCollection
ilAccessCustomRBACOperationAddedObjective
Definition:
class.ilAccessCustomRBACOperationAddedObjective.php:25
ILIAS\Test\Setup\Test10DBUpdateSteps
Definition:
Test10DBUpdateSteps.php:27
ILIAS\Setup\Objective
Definition:
AdminConfirmedObjective.php:21
HasNoNamedObjective
ILIAS\Test\Setup\Test9DBUpdateSteps
Definition:
Test9DBUpdateSteps.php:23
ILIAS\Test\Setup\TestSetupAgent\getUpdateObjective
getUpdateObjective(?Config $config=null)
Definition:
TestSetupAgent.php:36
ILIAS\Test\Setup\TestSetupAgent\getInstallObjective
getInstallObjective(?Config $config=null)
Definition:
TestSetupAgent.php:98
ILIAS\Refinery\Transformation
A transformation is a function from one datatype to another.
Definition:
Transformation.php:34
NullAgent
ILIAS\Setup\Config
A configuration for the setup.
Definition:
Config.php:26
ILIAS\Test\Setup\TestSetupAgent\getMigrations
getMigrations()
Definition:
TestSetupAgent.php:108
ILIAS\Test\Setup\CloneIntroductionAndClosingRemarksMigration
Definition:
CloneIntroductionAndClosingRemarksMigration.php:27
NullObjective
ILIAS\Test\Setup\TestSetupAgent\getStatusObjective
getStatusObjective(Storage $storage)
Definition:
TestSetupAgent.php:68
components
ILIAS
Test
src
Setup
TestSetupAgent.php
Generated on Wed Sep 3 2025 23:04:05 for ILIAS by
1.8.13 (using
Doxyfile
)