$request =
$post->
signRequest($request,
$this->authSecret
);
static::
assertFalse($request->
hasHeader(RequestSigner::SHOPWARE_SHOP_SIGNATURE
));
} public function testIsResponseAuthenticRequired(): void
{ $body = '{"method":"hi.nam","params":["1","2","3"]}';
$post =
new RequestSigner();
$signature =
$post->
signPayload($body,
$this->authSecret
);
$responseHeaders =
[ RequestSigner::SHOPWARE_APP_SIGNATURE =>
$signature,
];
$response =
new Response(200,
$responseHeaders,
$body);
static::
assertTrue($post->
isResponseAuthentic($response,
$this->authSecret
));
static::
assertNotEmpty($response->
getBody()->
getContents());
}