Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
GenerateThumbnailsCommand example
$input
=
new
StringInput
(
'--strict'
)
;
$output
=
new
BufferedOutput
(
)
;
$thumbnailServiceMock
=
$this
->
getMockBuilder
(
ThumbnailService::
class
)
->
disableOriginalConstructor
(
)
->
getMock
(
)
;
$thumbnailServiceMock
->
expects
(
static
::
exactly
(
\
count
(
$this
->initialMediaIds
)
+
$newMedia
->
count
(
)
)
)
->
method
(
'updateThumbnails'
)
->
with
(
static
::
anything
(
)
,
$this
->context, true
)
;
$command
=
new
GenerateThumbnailsCommand
(
$thumbnailServiceMock
,
$this
->mediaRepository,
$this
->mediaFolderRepository,
$this
->
getContainer
(
)
->
get
(
'messenger.bus.shopware'
)
)
;
$this
->
runCommand
(
$command
,
$input
,
$output
)
;
}
public
function
testItCallsUpdateThumbnailsWithoutStrictArgument
(
)
: void
{