ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
TestSetupAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Test\Setup;
22
29use ILIAS\Setup\Agent\HasNoNamedObjective;
31
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,
43 ),
46 ),
48 'tst_history_read',
49 'View History in Tests',
50 'object',
51 7200,
52 ['tst']
53 ),
57 ),
59 'score_anon',
60 'Score Pseudonymously',
61 'object',
62 5000,
63 ['tst']
64 ),
67 )
68 );
69 }
70
71 public function getStatusObjective(Storage $storage): Objective
72 {
73 return new ObjectiveCollection(
74 'ILIAS\Test',
75 true,
77 $storage,
79 ),
81 $storage,
83 ),
85 $storage,
87 ),
89 $storage,
91 ),
92 );
93 }
94
95 public function hasConfig(): bool
96 {
97 return false;
98 }
99
101 {
102 throw new \LogicException("Agent has no config.");
103 }
104
105 public function getInstallObjective(?Config $config = null): Objective
106 {
107 return new NullObjective();
108 }
109
110 public function getBuildObjective(): Objective
111 {
112 return new NullObjective();
113 }
114
115 public function getMigrations(): array
116 {
117 return [
121 ];
122 }
123}
An agent that just doesn't do a thing.
Definition: NullAgent.php:35
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
getStatusObjective(Storage $storage)
getUpdateObjective(?Config $config=null)
@inheritdocs
getArrayToConfigTransformation()
@inheritdocs
getInstallObjective(?Config $config=null)
@inheritdocs
This class attempt to achieve a set of database update steps.
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:27
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31