$progress =
$this->
import($context, ProductDefinition::ENTITY_NAME, '/fixtures/products_with_updated_cover.csv', 'products.csv'
);
static::
assertSame(Progress::STATE_SUCCEEDED,
$progress->
getState());
/** @var ProductEntity $product */
$product =
$this->productRepository->
search( (new Criteria(['e5c8b8f701034e8dbea72ac0fc32521e'
]))->
addAssociation('media'
),
Context::
createDefaultContext() )->
first();
static::
assertInstanceOf(ProductMediaCollection::
class,
$product->
getMedia());
static::
assertCount(1,
$product->
getMedia());
} /**
* @group slow
*/
public function testProductsWithVariantsCsv(): void
{ $connection =
$this->
getContainer()->
get(Connection::
class);
$connection->
executeStatement('DELETE FROM `product`'
);