/**
* This test verifies that our payload is
* correctly built when setting the code as "redeemed".
* We need this data as "soft" reference to the order,
* line item and everything that might be important.
*
* @group promotions
*/
public function testRedeemedPayload(): void
{ $entity =
new PromotionIndividualCodeEntity();
$entity->
setCode('my-code-123'
);
$entity->
setRedeemed('O-123', '1', 'John Doe'
);
$expected =
[ 'orderId' => 'O-123',
'customerId' => '1',
'customerName' => 'John Doe',
];
static::
assertEquals($expected,
$entity->
getPayload());
}