Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
UnitEntity example
class
ProductPriceCalculatorTest
extends
TestCase
{
private
ProductPriceCalculator
$calculator
;
protected
function
setUp
(
)
: void
{
$this
->calculator =
new
ProductPriceCalculator
(
new
StaticEntityRepository
(
[
new
UnitCollection
(
[
(
new
UnitEntity
(
)
)
->
assign
(
[
'id' => Defaults::CURRENCY, 'translated' =>
[
'name' => 'test'
]
]
)
]
)
,
]
)
,
new
QuantityPriceCalculator
(
new
GrossPriceCalculator
(
new
TaxCalculator
(
)
,
new
CashRounding
(
)
)
,
new
NetPriceCalculator
(
new
TaxCalculator
(
)
,
new
CashRounding
(
)
)
)
)
;
}
/** * @dataProvider priceWillBeCalculated */