inTestEnv = (bool) getenv(self::ENV_TRIGGER); $this->stepControl = new StepControl(); } public function setUp(): void { Fixture::createSuperUser(); if (!self::siteCreated($this->idSite)) { self::createWebsite('2021-01-01'); } } public function tearDown(): void { // empty } public function provideContainerConfig(): array { if (!$this->inTestEnv) { return []; } return [ 'ini.tests.enable_logging' => 1, 'log.handlers' => static function (Container $c) { return [$c->get(EchoHandler::class)]; }, 'observers.global' => DI::add([ [ 'ScheduledTasks.execute', DI::value(Closure::fromCallable([$this->stepControl, 'handleScheduledTasksExecute'])), ], ]), ]; } }