$this->
getRequestHandler()->
append(new Response(200,
[], '{"signature": "signed"}'
));
static::
assertEquals('signed',
$this->storeClient->
signPayloadWithAppSecret('[this can be anything]', 'testApp'
));
$lastRequest =
$this->
getRequestHandler()->
getLastRequest();
static::
assertInstanceOf(RequestInterface::
class,
$lastRequest);
static::
assertEquals('/swplatform/generatesignature',
$lastRequest->
getUri()->
getPath());
static::
assertEquals([ 'shopwareVersion' =>
$this->
getShopwareVersion(),
'language' => 'en-GB',
'domain' => 'shopware-test',
], Query::
parse($lastRequest->
getUri()->
getQuery()));
static::
assertEquals([ 'appName' => 'testApp',
'payload' => '[this can be anything]',
], \
json_decode($lastRequest->
getBody()->
getContents(), true, flags: \JSON_THROW_ON_ERROR
));
} public function testItUpdatesUserTokenAfterLogin(): void
{