protected function setUp(): void
{ $this->storeRequestOptionsProvider =
$this->
getContainer()->
get(StoreRequestOptionsProvider::
class);
$this->storeContext =
$this->
createAdminStoreContext();
} public function testGetAuthenticationHeadersHasUserStoreTokenAndShopSecret(): void
{ $shopSecret = 'im-a-super-safe-secret';
$this->
setShopSecret($shopSecret);
$headers =
$this->storeRequestOptionsProvider->
getAuthenticationHeader($this->storeContext
);
static::
assertEquals([ 'X-Shopware-Platform-Token' =>
$this->
getStoreTokenFromContext($this->storeContext
),
'X-Shopware-Shop-Secret' =>
$shopSecret,
],
$headers);
} public function testGetAuthenticationHeadersUsesFirstStoreTokenFoundIfContextIsSystemSource(): void
{ $shopSecret = 'im-a-super-safe-secret';