ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ),
65 );
66 }
67
68 public function getStatusObjective(Storage $storage): Objective
69 {
70 return new ObjectiveCollection(
71 'ILIAS\Test',
72 true,
74 $storage,
76 ),
78 $storage,
80 ),
82 $storage,
84 ),
85 );
86 }
87
88 public function hasConfig(): bool
89 {
90 return false;
91 }
92
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 [
112 ];
113 }
114}
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