Sylius\Behat\Context\Setup\ProductContext::thisProductBelongsToShippingCategory PHP Method

thisProductBelongsToShippingCategory() public method

public thisProductBelongsToShippingCategory ( Sylius\Component\Core\Model\ProductInterface $product, Sylius\Component\Shipping\Model\ShippingCategoryInterface $shippingCategory )
$product Sylius\Component\Core\Model\ProductInterface
$shippingCategory Sylius\Component\Shipping\Model\ShippingCategoryInterface
    public function thisProductBelongsToShippingCategory(ProductInterface $product, ShippingCategoryInterface $shippingCategory)
    {
        $product->getVariants()->first()->setShippingCategory($shippingCategory);
        $this->objectManager->flush();
    }