Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
deleteCustomMenu example
$this
->
drupalGet
(
'admin/structure/menu/item/' .
$this
->items
[
0
]
->
id
(
)
. '/delete'
)
;
$this
->
assertSession
(
)
->
statusCodeEquals
(
200
)
;
$this
->
drupalGet
(
'admin/structure/menu/link/' .
$this
->items
[
0
]
->
getPluginId
(
)
. '/reset'
)
;
$this
->
assertSession
(
)
->
statusCodeEquals
(
403
)
;
// Delete menu links.
foreach
(
$this
->items
as
$item
)
{
$this
->
deleteMenuLink
(
$item
)
;
}
// Delete custom menu.
$this
->
deleteCustomMenu
(
)
;
// Modify and reset a standard menu link.
$instance
=
$this
->
getStandardMenuLink
(
)
;
$old_weight
=
$instance
->
getWeight
(
)
;
// Edit the static menu link.
$edit
=
[
]
;
$edit
[
'weight'
]
= 10;
$id
=
$instance
->
getPluginId
(
)
;
$this
->
drupalGet
(
"admin/structure/menu/link/{
$id
}
/edit"
)
;
$this
->
submitForm
(
$edit
, 'Save'
)
;
$this
->
assertSession
(
)
->
statusCodeEquals
(
200
)
;