CodeExplorer setLineItemTaxes example
static::
assertNotNull($response->
getCartPriceTaxes());
static::
assertCount(2,
$response->
getCartPriceTaxes());
static::
assertEquals(new CalculatedTax(7.0, 7.0, 7.0
),
$response->
getCartPriceTaxes()->
getAt(0
));
static::
assertEquals(new CalculatedTax(8.0, 8.0, 8.0
),
$response->
getCartPriceTaxes()->
getAt(1
));
} public function testSetters(): void
{ $response =
new TaxProviderResponse();
$response->
setLineItemTaxes([ $this->ids->
get('line-item-1'
) =>
new CalculatedTaxCollection([ new CalculatedTax(1.0, 1.0, 1.0
),
]),
$this->ids->
get('line-item-2'
) =>
new CalculatedTaxCollection([ new CalculatedTax(2.0, 2.0, 2.0
),
new CalculatedTax(3.0, 3.0, 3.0
),
]),
]);
$response->
setDeliveryTaxes([ $this->ids->
get('delivery-1'
) =>
new CalculatedTaxCollection([