public function testOldEntriesCanBeFinished(): void
{ $connection =
$this->
getContainer()->
get(Connection::
class);
$connection->
insert('system_config',
[ 'id' => Uuid::
randomBytes(),
'configuration_key' => IndexerQueuer::INDEXER_KEY,
'configuration_value' =>
json_encode(['_value' =>
['test.indexer' => 1
]]),
'created_at'
=> (new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
]);
$queuer =
new IndexerQueuer($connection);
$queuer->
finishIndexer(['test.indexer'
]);
static::
assertSame([],
$queuer->
getIndexers());
} public function testWithOldEntriesAndNewCanBeFinished(): void
{ $connection =
$this->
getContainer()->
get(Connection::
class);
$connection->
insert('system_config',
[ 'id' => Uuid::
randomBytes(),
'configuration_key' => IndexerQueuer::INDEXER_KEY,
'configuration_value' =>
json_encode(['_value' =>
['test.indexer' => 1
]]),