Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
testRenderViewInheritance example
$twig
=
$this
->
createFinder
(
[
new
BundleFixture
(
'TestPlugin1', __DIR__ . '/fixtures/Plugins/TestPlugin1/'
)
,
new
BundleFixture
(
'Storefront', __DIR__ . '/fixtures/Storefront/'
)
,
]
)
;
$controller
=
new
TestController
(
)
;
$controller
->
setTwig
(
$twig
)
;
$controller
->
setContainer
(
$this
->
getContainer
(
)
)
;
$controller
->
setTemplateFinder
(
$twig
->
getExtension
(
NodeExtension::
class
)
->
getFinder
(
)
)
;
$rendered
=
$controller
->
testRenderViewInheritance
(
'@Storefront/storefront/base.html.twig'
)
;
static
::
assertEquals
(
'inherited',
$rendered
)
;
}
public
function
testStorefrontPluginTemplatePaths
(
)
: void
{
$twig
=
$this
->
createFinder
(
[
new
BundleFixture
(
'TestPlugin1', __DIR__ . '/fixtures/Plugins/TestPlugin1/'
)
,
new
BundleFixture
(
'Storefront', __DIR__ . '/fixtures/Storefront/'
)
,
]
)
;