/** * @When /^I view (oldest|newest) products from (taxon "([^"]+)")$/ */ public function iViewSortedProductsFromTaxon($sortDirection, TaxonInterface $taxon) { $sorting = ['createdAt' => 'oldest' === $sortDirection ? 'asc' : 'desc']; $this->taxonShowPage->open(['slug' => $taxon->getSlug(), 'sorting' => $sorting]); }
/** * @When /^I browse products from (taxon "([^"]+)")$/ */ public function iCheckListOfProductsForTaxon(TaxonInterface $taxon) { $this->taxonShowPage->open(['permalink' => $taxon->getPermalink()]); }