protected function setUp(): void
{ $this->repository =
$this->
getContainer()->
get('product_export.repository'
);
$this->service =
$this->
getContainer()->
get(ProductExportGenerator::
class);
$this->context = Context::
createDefaultContext();
} public function testExport(): void
{ $productExportId =
$this->
createTestEntity();
$criteria =
$this->
createProductExportCriteria($productExportId);
$productExport =
$this->repository->
search($criteria,
$this->context
)->
first();
$exportResult =
$this->service->
generate($productExport,
new ExportBehavior());
static::
assertInstanceOf(ProductExportResult::
class,
$exportResult);
static::
assertStringEqualsFile(__DIR__ . '/fixtures/test-export.csv',
$exportResult->
getContent());
} public function testProductExportGenerationEvents(): void
{