/** * @Then they should have order like :firstTaxonName, :secondTaxonName, :thirdTaxonName and :fourthTaxonName */ public function theyShouldHaveOrderLikeAnd(...$taxonsNames) { $leaves = $this->createPage->getLeaves(); foreach ($leaves as $key => $leaf) { Assert::contains($taxonsNames[$key], $leaf->getText()); } }
/** * @Then I should see the taxon named :name in the list */ public function iShouldSeeTheTaxonNamedInTheList($name) { Assert::eq(1, $this->createPage->countTaxonsByName($name), sprintf('Taxon %s does not exist or multiple taxons with this name exist.', $name)); }