$gatewayRegistry =
$this->
getContainer()->
get('shopware.increment.gateway.registry'
);
$gateway =
$gatewayRegistry->
get(IncrementGatewayRegistry::MESSAGE_QUEUE_POOL
);
$gateway->
reset('message_queue_stats', 'foo'
);
$gateway->
reset('message_queue_stats', 'bar'
);
$gateway->
increment('message_queue_stats', 'foo'
);
$gateway->
increment('message_queue_stats', 'bar'
);
$gateway->
increment('message_queue_stats', 'bar'
);
$url = '/api/_info/queue.json';
$client =
$this->
getBrowser();
$client->
request('GET',
$url);
static::
assertSame(200,
$client->
getResponse()->
getStatusCode());
$entries =
json_decode($client->
getResponse()->
getContent(), true, 512, \JSON_THROW_ON_ERROR
);
$mapped =
[];
foreach ($entries as $entry) { $mapped[$entry['name'
]] =
$entry['size'
];
}