Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getLanguageFromContext example
static
::
expectException
(
InvalidContextSourceUserException::
class
)
;
$this
->storeRequestOptionsProvider->
getAuthenticationHeader
(
$context
)
;
}
public
function
testGetDefaultQueriesReturnsLanguageFromContext
(
)
: void
{
$queries
=
$this
->storeRequestOptionsProvider->
getDefaultQueryParameters
(
$this
->storeContext
)
;
static
::
assertArrayHasKey
(
'language',
$queries
)
;
static
::
assertEquals
(
$this
->
getLanguageFromContext
(
$this
->storeContext
)
,
$queries
[
'language'
]
)
;
}
public
function
testGetDefaultQueriesReturnsShopwareVersion
(
)
: void
{
$queries
=
$this
->storeRequestOptionsProvider->
getDefaultQueryParameters
(
$this
->storeContext
)
;
static
::
assertArrayHasKey
(
'shopwareVersion',
$queries
)
;
static
::
assertEquals
(
$this
->
getShopwareVersion
(
)
,
$queries
[
'shopwareVersion'
]
)
;
}