Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getDetailResponseFixture example
new
AppCollection
(
[
$this
->
getInstalledApp
(
)
]
)
)
;
/** @var ExtensionStruct $extension */
$extension
=
$extensions
->
get
(
'TestApp'
)
;
static
::
assertSame
(
'1.0.0',
$extension
->
getVersion
(
)
)
;
static
::
assertSame
(
'1.0.1',
$extension
->
getLatestVersion
(
)
)
;
}
public
function
testItLoadsExtensionFromResponseLikeArray
(
)
: void
{
$listingResponse
=
$this
->
getDetailResponseFixture
(
)
;
$extension
=
$this
->extensionLoader->
loadFromArray
(
Context::
createDefaultContext
(
)
,
$listingResponse
)
;
static
::
assertNull
(
$extension
->
getLocalId
(
)
)
;
static
::
assertNull
(
$extension
->
getLicense
(
)
)
;
static
::
assertNull
(
$extension
->
getVersion
(
)
)
;
static
::
assertEquals
(
$listingResponse
[
'name'
]
,
$extension
->
getName
(
)
)
;
static
::
assertEquals
(
$listingResponse
[
'label'
]
,
$extension
->
getLabel
(
)
)
;