->
factory($hook,
$this->script
);
$id =
$this->ids->
get('p1'
);
$product =
$service->
products()->
add($id, 10
);
$container =
$service->
container('my-container'
);
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'
);