107 : void
108 {
111 {
112 }
113 public function started(string $class, int $step): void
114 {
115 $this->test->steps->called[] = ["started", $class, $step];
116 }
117 public function finished(string $class, int $step): void
118 {
119 $this->test->steps->called[] = ["finished", $class, $step];
120 }
121 public function getLastStartedStep(
string $class):
int
122 {
123 return 0;
124 }
125 public function getLastFinishedStep(
string $class):
int
126 {
127 return 0;
128 }
129 };
131 };
132 $db = $this->createMock(ilDBInterface::class);
134 ilDBStepReader::class => $steps_reader,
135 ilDatabaseUpdateStepExecutionLog::class => $execution_log,
136 Environment::RESOURCE_DATABASE => $db
137 ]);
138
139 $this->objective->achieve($env);
140
141 $expected = [
142 ["started", Test_ilDatabaseUpdateSteps::class, 1],
143 1,
144 ["finished", Test_ilDatabaseUpdateSteps::class, 1],
145 ["started", Test_ilDatabaseUpdateSteps::class, 2],
146 2,
147 ["finished", Test_ilDatabaseUpdateSteps::class, 2],
148 ["started", Test_ilDatabaseUpdateSteps::class, 4],
149 4,
150 ["finished", Test_ilDatabaseUpdateSteps::class, 4]
151 ];
152
153 $this->assertSame($expected, $this->steps->called);
154 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc