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
    {
        
Home | Imprint | This part of the site doesn't use cookies.