public function testSuccessfulUpgradeAccessTokenDeletesFrwTokenAndStoresStoreToken(): void
{ $shopUserTokenStruct =
new ShopUserTokenStruct( 'shop-us3r-t0k3n',
new \
DateTimeImmutable('2022-12-15'
),
);
$shopUserTokenResponse =
[ 'shopUserToken' =>
[ 'token' =>
$shopUserTokenStruct->
getToken(),
'expirationDate' =>
$shopUserTokenStruct->
getExpirationDate()->
format(Defaults::STORAGE_DATE_FORMAT
),
],
'shopSecret' => 'shop-s3cr3t',
];
$accessTokenStruct =
new AccessTokenStruct( $shopUserTokenStruct,
$shopUserTokenResponse['shopSecret'
] );
$frwClient =
$this->
createMock(FirstRunWizardClient::
class);
$frwClient->
expects(static::
once())