$this->
getContainer()->
get('shopware.app_system.guzzle'
),
$this->shopUrl,
$this->
getContainer(),
$this->
getContainer()->
get(HookableEventFactory::
class),
Kernel::SHOPWARE_FALLBACK_VERSION,
$this->bus,
true
);
$webhookDispatcher->
dispatch($event);
$history =
$this->guzzleHistory->
getHistory();
static::
assertCount(2,
$history);
foreach ($history as $historyEntry) { /** @var Request $request */
$request =
$historyEntry['request'
];
$payload =
json_decode($request->
getBody()->
getContents(), true, 512, \JSON_THROW_ON_ERROR
);
static::
assertArrayHasKey('timestamp',
$payload);
static::
assertArrayHasKey('eventId',
$payload['source'
]);
unset($payload['timestamp'
],
$payload['source'
]['eventId'
]);