Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setNewStates example
class
UpdatedStatesTest
extends
TestCase
{
public
function
testUpdatedStates
(
)
: void
{
$updatedStates
=
new
UpdatedStates
(
'foobar',
[
'foo'
]
,
[
'bar'
]
)
;
static
::
assertEquals
(
'foobar',
$updatedStates
->
getId
(
)
)
;
static
::
assertEquals
(
[
'foo'
]
,
$updatedStates
->
getOldStates
(
)
)
;
static
::
assertEquals
(
[
'bar'
]
,
$updatedStates
->
getNewStates
(
)
)
;
$updatedStates
->
setNewStates
(
[
'foo'
]
)
;
static
::
assertEquals
(
[
'foo'
]
,
$updatedStates
->
getNewStates
(
)
)
;
}
}