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