createCsvExport example

'domains' => [
                [
                    'id' => $salesChannelDomainId,
                    'languageId' => Defaults::LANGUAGE_SYSTEM,
                    'currencyId' => Defaults::CURRENCY,
                    'snippetSetId' => $this->getSnippetSetIdForLocale('en-GB'),
                    'url' => 'http://example.com',
                ],
            ],
        ]);

        $productExport = $this->createCsvExport(
            ProductExportEntity::ENCODING_UTF8,
            $salesChannelId,
            $salesChannelDomainId
        );
        $client->request('GET', getenv('APP_URL') . sprintf('/store-api/product-export/%s/%s', $productExport->getAccessKey()$productExport->getFileName()));

        $csvRows = explode(\PHP_EOL, (string) $client->getResponse()->getContent());

        static::assertCount(4, $csvRows);
        static::assertEquals(ProductExportEntity::ENCODING_UTF8, $client->getResponse()->getCharset());
    }

    
Home | Imprint | This part of the site doesn't use cookies.