Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ElasticsearchAdminIndexingCommand example
class
ElasticsearchAdminIndexingCommandTest
extends
TestCase
{
public
function
testExecute
(
)
: void
{
$registry
=
$this
->
getMockBuilder
(
AdminSearchRegistry::
class
)
->
disableOriginalConstructor
(
)
->
getMock
(
)
;
$registry
->
expects
(
static
::
any
(
)
)
->
method
(
'iterate'
)
->
with
(
new
AdminIndexingBehavior
(
true,
[
]
,
[
'promotion'
]
)
)
;
$commandTester
=
new
CommandTester
(
new
ElasticsearchAdminIndexingCommand
(
$registry
)
)
;
$commandTester
->
execute
(
[
'--no-queue' => true, '--only' => 'promotion'
]
)
;
$commandTester
->
assertCommandIsSuccessful
(
)
;
}
}