Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ExpressionCacheWarmer example
$expressionLang
=
$this
->
createMock
(
ExpressionLanguage::
class
)
;
$expressionLang
->
expects
(
$this
->
exactly
(
2
)
)
->
method
(
'parse'
)
->
willReturnCallback
(
function
D...
$args
)
use
(
&
$series
)
{
$expectedArgs
=
array_shift
(
$series
)
;
$this
->
assertSame
(
$expectedArgs
,
$args
)
;
return
$this
->
createMock
(
ParsedExpression::
class
)
;
}
)
;
(
new
ExpressionCacheWarmer
(
$expressions
,
$expressionLang
)
)
->
warmUp
(
''
)
;
}
}