'version' => '0.0.1',
'integration_id' => Uuid::
fromHexToBytes($ids->
get('integration'
)),
'acl_role_id' => Uuid::
fromHexToBytes($ids->
get('acl_role'
)),
'created_at'
=> (new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
]);
$connection->
insert('integration_role',
[ 'integration_id' => Uuid::
fromHexToBytes($ids->
get('integration'
)),
'acl_role_id' => Uuid::
fromHexToBytes($ids->
get('acl_role'
)),
]);
$this->
resetBrowser();
$browser =
$this->
getBrowser();
$browser->
followRedirects();
$browser->
setServerParameter('HTTP_' . PlatformRequest::HEADER_APP_INTEGRATION_ID,
$ids->
get('integration'
));
$browser->
request('POST', '/api/search/currency',
[ 'limit' => 2,
]);
$response =
json_decode((string) $browser->
getResponse()->
getContent(), true, 512, \JSON_THROW_ON_ERROR
);
static::
assertEquals(Response::HTTP_FORBIDDEN,
$browser->
getResponse()->
getStatusCode(), \
json_encode($response, \JSON_THROW_ON_ERROR
));
static::
assertArrayHasKey('errors',
$response);
}