Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ThemeRegistryLoader example
/** * @covers ::findTemplate */
public
function
testLoaderReturnsFalseForExistsOnNonexistent
(
)
{
$registry
=
$this
->
prophesize
(
'Drupal\Core\Theme\Registry'
)
;
$runtime
=
$this
->
prophesize
(
'Drupal\Core\Utility\ThemeRegistry'
)
;
$runtime
->
has
(
'foo'
)
->
shouldBeCalled
(
)
->
willReturn
(
FALSE
)
;
$registry
->
getRuntime
(
)
->
willReturn
(
$runtime
)
;
$loader
=
new
ThemeRegistryLoader
(
$registry
->
reveal
(
)
)
;
$this
->
assertFalse
(
$loader
->
exists
(
'foo'
)
)
;
}
}