Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setCancelationResponses example
protected
function
setUp
(
)
: void
{
$this
->extensionLicensesService =
$this
->
getContainer
(
)
->
get
(
AbstractExtensionStoreLicensesService::
class
)
;
}
public
function
testCancelSubscriptionNotInstalled
(
)
: void
{
$this
->
getContainer
(
)
->
get
(
SystemConfigService::
class
)
->
set
(
StoreService::CONFIG_KEY_STORE_LICENSE_DOMAIN, 'localhost'
)
;
$context
=
$this
->
getContextWithStoreToken
(
)
;
$this
->
setCancelationResponses
(
)
;
$this
->extensionLicensesService->
cancelSubscription
(
1,
$context
)
;
$lastRequest
=
$this
->
getRequestHandler
(
)
->
getLastRequest
(
)
;
static
::
assertEquals
(
'/swplatform/pluginlicenses/1/cancel',
$lastRequest
->
getUri
(
)
->
getPath
(
)
)
;
static
::
assertEquals
(
[