/** * @Then I should have :paymentMethodName payment method available as the last choice */ public function iShouldHavePaymentMethodAvailableAsLastChoice($paymentMethodName) { $paymentMethods = $this->selectPaymentPage->getPaymentMethods(); $lastPaymentMethod = end($paymentMethods); Assert::same($paymentMethodName, $lastPaymentMethod); }