publicfunctiontestEntityExtensionSerialization(): void { // add temporary db table for the test extension
$connection = $this->getContainer()->get(Connection::class); $migration = newTestExtensionMigration(); $migration->update($connection); $connection->setNestTransactionsWithSavepoints(true); $connection->beginTransaction(); // do everything in a transaction
// setup test extension
$this->registerDefinition(TestExtensionDefinition::class); $this->registerDefinitionWithExtensions(ProductDefinition::class, TestExtension::class);
// create a product with extension data
$productRepo = $this->getContainer()->get('product.repository'); $taxCriteria = newCriteria();