Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getEmptyRewindableGenerator example
class
CachePruneCommandTest
extends
TestCase
{
public
function
testCommandWithPools
(
)
{
$tester
=
$this
->
getCommandTester
(
$this
->
getKernel
(
)
,
$this
->
getRewindableGenerator
(
)
)
;
$tester
->
execute
(
[
]
)
;
}
public
function
testCommandWithNoPools
(
)
{
$tester
=
$this
->
getCommandTester
(
$this
->
getKernel
(
)
,
$this
->
getEmptyRewindableGenerator
(
)
)
;
$tester
->
execute
(
[
]
)
;
}
private
function
getRewindableGenerator
(
)
: RewindableGenerator
{
return
new
RewindableGenerator
(
function
D
)
{
yield
'foo_pool' =>
$this
->
getPruneableInterfaceMock
(
)
;
yield
'bar_pool' =>
$this
->
getPruneableInterfaceMock
(
)
;
}
, 2
)
;
}