Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getOldVersion example
class
UpdatePreFinishEventTest
extends
TestCase
{
public
function
testGetters
(
)
: void
{
$context
= Context::
createDefaultContext
(
)
;
$event
=
new
UpdatePreFinishEvent
(
$context
, 'oldVersion', 'newVersion'
)
;
static
::
assertSame
(
'oldVersion',
$event
->
getOldVersion
(
)
)
;
static
::
assertSame
(
'newVersion',
$event
->
getNewVersion
(
)
)
;
static
::
assertSame
(
$context
,
$event
->
getContext
(
)
)
;
}
}
class
UpdatePostFinishEventTest
extends
TestCase
{
public
function
testGetters
(
)
: void
{
$context
= Context::
createDefaultContext
(
)
;
$event
=
new
UpdatePostFinishEvent
(
$context
, 'oldVersion', 'newVersion'
)
;
static
::
assertSame
(
'oldVersion',
$event
->
getOldVersion
(
)
)
;
static
::
assertSame
(
'newVersion',
$event
->
getNewVersion
(
)
)
;
static
::
assertSame
(
$context
,
$event
->
getContext
(
)
)
;
}
}