Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertMigrationState example
public
function
testInstall
(
)
: MigrationCollection
{
static
::
assertSame
(
0,
$this
->connection->
getTransactionNestingLevel
(
)
)
;
$migrationPlugin
=
$this
->
getMigrationTestPlugin
(
)
;
static
::
assertNull
(
$migrationPlugin
->
getInstalledAt
(
)
)
;
$this
->pluginLifecycleService->
installPlugin
(
$migrationPlugin
,
$this
->context
)
;
$migrationCollection
=
$this
->
getMigrationCollection
(
'SwagManualMigrationTest'
)
;
$this
->
assertMigrationState
(
$migrationCollection
, 4, 1
)
;
return
$migrationCollection
;
}
/** * @depends testInstall */
public
function
testActivate
(
MigrationCollection
$migrationCollection
)
: MigrationCollection
{
$migrationPlugin
=
$this
->
getMigrationTestPlugin
(
)
;
$this
->pluginLifecycleService->
activatePlugin
(
$migrationPlugin
,
$this
->context
)
;