static::
assertInstanceOf(ItemFacade::
class,
$product);
static::
assertInstanceOf(ContainerFacade::
class,
$container);
$split =
$product->
take(1
);
static::
assertInstanceOf(ItemFacade::
class,
$split);
$container->
add($split);
$split =
$product->
take(1
);
static::
assertInstanceOf(ItemFacade::
class,
$split);
$container->
add($split);
$container->
discount('my-discount', 'percentage', -10, 'Fanzy discount'
);
$surcharge =
new PriceCollection([new Price(Defaults::CURRENCY, 2, 2, false
)]);
$container->
surcharge('my-surcharge', 'absolute',
$surcharge, 'unit test'
);
$service->
items()->
add($container);
$service->
calculate();
static::
assertTrue($service->
has('my-container'
));
$container =
$service->
get('my-container'
);
static::
assertInstanceOf(ItemFacade::
class,
$container);