public function testExecuteWithInput(): void
{ $commandTester =
new CommandTester($this->adminRefreshIndexCommand
);
$commandTester->
execute([]);
$message =
$commandTester->
getDisplay();
static::
assertStringContainsString('Are you sure you want to reset the Admin Elasticsearch indexing?',
$message);
static::
assertStringContainsString('Admin Elasticsearch indices deleted and queue cleared',
$message);
$client =
$this->
getDiContainer()->
get(Client::
class);
$client->
indices()->
get(['index' => EnvironmentHelper::
getVariable('SHOPWARE_ADMIN_ES_INDEX_PREFIX'
) . '*'
]);
$tasks =
$this->connection->
fetchAllAssociative('SELECT `index` FROM admin_elasticsearch_index_task'
);
static::
assertEmpty($tasks);
} protected function getDiContainer(): ContainerInterface
{ return $this->
getContainer();
}}