Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
enableLayoutsForBundle example
$node_url
= 'node/1';
$assert_session
=
$this
->
assertSession
(
)
;
$page
=
$this
->
getSession
(
)
->
getPage
(
)
;
// Ensure the block is not displayed initially.
$this
->
drupalGet
(
$node_url
)
;
$assert_session
->
pageTextContains
(
'The node body'
)
;
$assert_session
->
pageTextNotContains
(
'Powered by Drupal'
)
;
$assert_session
->
linkNotExists
(
'Layout'
)
;
$this
->
enableLayoutsForBundle
(
'admin/structure/types/manage/bundle_with_section_field/display', TRUE
)
;
// The existing content is still shown until overridden.
$this
->
drupalGet
(
$node_url
)
;
$assert_session
->
pageTextContains
(
'The node body'
)
;
// Enter the layout editing mode.
$assert_session
->
linkExists
(
'Layout'
)
;
$this
->
clickLink
(
'Layout'
)
;
$this
->
markCurrentPage
(
)
;
$assert_session
->
pageTextContains
(
'The node body'
)
;
$assert_session
->
linkExists
(
'Add section'
)
;