$this->connection =
$this->
getContainer()->
get(Connection::
class);
$this->connection->
executeStatement('DELETE FROM `log_entry`'
);
$this->systemConfigService =
$this->
getContainer()->
get(SystemConfigService::
class);
$this->scheduledTaskRepository =
$this->
getContainer()->
get('scheduled_task.repository'
);
$this->logEntryRepository =
$this->
getContainer()->
get('log_entry.repository'
);
$this->context = Context::
createDefaultContext();
} public function testCleanupWithNoLimits(): void
{ $this->
runWithOptions(-1, -1,
['test1', 'test2', 'test3'
]);
} public function testCleanupWithEntryLimit(): void
{ $this->
runWithOptions(-1, 1,
['test1'
]);
} public function testCleanupWithAgeLimit(): void
{ $year = 60 * 60 * 24 * 31 * 12;
$this->
runWithOptions((int) ($year * 1.5
), -1,
['test1'
]);
}