$response =
json_decode((string) $client->
getResponse()->
getContent(), true, 512, \JSON_THROW_ON_ERROR
);
static::
assertArrayHasKey('handledMessages',
$response);
static::
assertIsInt($response['handledMessages'
]);
static::
assertEquals(1,
$response['handledMessages'
]);
$filePath =
sprintf('%s/Testexport.csv',
$this->
getContainer()->
getParameter('product_export.directory'
));
$fileContent =
$this->fileSystem->
read($filePath);
$csvRows =
explode(\PHP_EOL,
(string) $fileContent);
static::
assertTrue($this->fileSystem->
directoryExists($this->
getContainer()->
getParameter('product_export.directory'
)));
static::
assertTrue($this->fileSystem->
fileExists($filePath));
static::
assertCount(4,
$csvRows);
/** @var ProductExportEntity|null $newExport */
$newExport =
$this->productExportRepository->
search(new Criteria([$exportId]),
$this->context
)->
first();
static::
assertNotNull($newExport);
static::
assertGreaterThan($previousGeneratedAt,
$newExport->
getGeneratedAt());
} /**
* @group quarantined
*/