/** * @param Symfony\Component\EventDispatcher\GenericEvent $event * @param Sylius\Bundle\InventoryBundle\Model\StockableInterface $stockable */ function it_should_fill_backorders_on_inventory_change($operator, $event, $stockable) { $event->getSubject()->shouldBeCalled()->willReturn($stockable); $operator->fillBackorders($stockable)->shouldBeCalled(); $this->onInventoryChange($event); }