IIRC this should work:
```php
$stockable->getId()->will(function() {
     return 3;
});
$unit->getStockable()->willReturn($stockable);