static::
assertTrue($this->
hasColumn('order_line_item', 'promotion_id'
));
} /**
* @dataProvider dataProviderPromotion
*/
public function testMigrationMigratesPromotionId(bool
$promotionExists): void
{ $context = Context::
createDefaultContext();
$this->
buildPromotionLineItem($context,
$promotionExists);
/** @var EntityRepository<OrderLineItemCollection> $orderLineItemRepository */
$orderLineItemRepository =
$this->
getContainer()->
get('order_line_item.repository'
);
/** @var OrderLineItemEntity|null $lineItem */
$lineItem =
$orderLineItemRepository->
search(new Criteria([$this->ids->
get('line-item'
)]),
$context)->
first();
static::
assertNotNull($lineItem);
static::
assertNull($lineItem->
getPromotionId());
$this->
removeColumn();