/**
* @after
*/
public function restoreStoreUri(): void
{ $this->
getSystemConfigService()->
set(self::STORE_URI_CONFIG_KEY,
$this->originalStoreUri
);
} public function testItCreatesAnClientWithBaseConfig(): void
{ $storeClientFactory =
new StoreClientFactory($this->
getSystemConfigService());
$client =
$storeClientFactory->
create([$this->
createMock(VerifyResponseSignatureMiddleware::
class)]);
$config =
$this->
getConfigFromClient($client);
static::
assertEquals(self::TEST_STORE_URI,
$config['base_uri'
]);
static::
assertArrayHasKey('Content-Type',
$config['headers'
]);
static::
assertEquals('application/json',
$config['headers'
]['Content-Type'
]);
static::
assertArrayHasKey('Accept',
$config['headers'
]);
static::
assertEquals('application/vnd.api+json,application/json',
$config['headers'
]['Accept'
]);