/** * @Given /^there are ([^"]+) units of ("[^"]+" variant of product "[^"]+") available in the inventory$/ */ public function thereAreItemsOfProductInVariantAvailableInTheInventory($quantity, ProductVariantInterface $productVariant) { $productVariant->setTracked(true); $productVariant->setOnHand($quantity); $this->objectManager->flush(); }