/** * @Then /^there should be(?:| only) (\d+) payments?$/ */ public function theOrderShouldHaveNumberOfPayments($number) { $actualNumberOfPayments = $this->showPage->getPaymentsCount(); Assert::eq($number, $actualNumberOfPayments); }