/** * {@inheritdoc} */ public function hasPaymentMethod(PaymentMethodInterface $paymentMethod) { if (!$this->hasElement('payment_method')) { return false; } return false !== strpos($this->getElement('payment_method')->getText(), $paymentMethod->getName()); }
/** * @Then /^(this payment method) should no longer exist in the registry$/ */ public function thisPaymentMethodShouldNoLongerExistInTheRegistry(PaymentMethodInterface $paymentMethod) { Assert::false($this->indexPage->isSingleResourceOnPage(['code' => $paymentMethod->getCode(), 'name' => $paymentMethod->getName()]), sprintf('Payment method %s should no longer exist in the registry', $paymentMethod->getName())); }