if($idx === 0){ static::assertEquals($parentProductId, $lineItem->getId()); }else{ static::assertEquals($rootProductId, $lineItem->getId()); } ++$idx; } // set token to be equal for further comparison
$cart->setToken($convertedCart->getToken());
// transactions are currently not supported so they are excluded for comparison
$cart->setTransactions(newTransactionCollection());
// remove delivery information from line items
foreach($cart->getDeliveries()as$delivery){ // remove address from ShippingLocation
$property = ReflectionHelper::getProperty(ShippingLocation::class, 'address'); $property->setValue($delivery->getLocation(), null);