Exemplo n.º 1
0
 /**
  * Check whether stockable is in stock or not.
  *
  * @param StockableInterface $stockable
  *
  * @return Boolean
  */
 public function isStockAvailable(StockableInterface $stockable)
 {
     return $this->checker->isStockAvailable($stockable);
 }
Exemplo n.º 2
0
 function it_delegates_the_stock_availability_checking_to_the_checker(AvailabilityCheckerInterface $checker, StockableInterface $stockable)
 {
     $checker->isStockAvailable($stockable)->shouldBeCalled()->willReturn(true);
     $this->isStockAvailable($stockable)->shouldReturn(true);
 }