getSalesChannelRepositoryMock example


class ProductExportGenerateTaskHandlerTest extends TestCase
{
    /** * @dataProvider shouldBeRunDataProvider */
    public function testShouldBeRun(ProductExportEntity $productExportEntity, bool $expectedResult): void
    {
        $salesChannelRepositoryMock = $this->getSalesChannelRepositoryMock();
        $salesChannelContextFactoryMock = $this->getSalesChannelContextFactoryMock();
        $productExportRepositoryMock = $this->getProductExportRepositoryMock($productExportEntity);

        $messageBusMock = new CollectingMessageBus();

        $productExportGenerateTaskHandler = new ProductExportGenerateTaskHandler(
            $this->createMock(EntityRepository::class),
            $salesChannelContextFactoryMock,
            $salesChannelRepositoryMock,
            $productExportRepositoryMock,
            $messageBusMock
        );
Home | Imprint | This part of the site doesn't use cookies.