| 1 | <?php |
||
| 20 | final class ShippingMethodContext implements Context |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var ShippingMethodRepositoryInterface |
||
| 24 | */ |
||
| 25 | private $shippingMethodRepository; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param ShippingMethodRepositoryInterface $shippingMethodRepository |
||
| 29 | */ |
||
| 30 | public function __construct(ShippingMethodRepositoryInterface $shippingMethodRepository) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @Transform /^"([^"]+)" shipping method$/ |
||
| 37 | * @Transform /^shipping method "([^"]+)"$/ |
||
| 38 | * @Transform :shippingMethod |
||
| 39 | */ |
||
| 40 | public function getShippingMethodByName($shippingMethodName) |
||
| 49 | } |
||
| 50 |