protected function trainPaymentMethod(PaymentMethodInterface $pm) { $pm->getId()->willReturn('spec'); $pm->getName()->willReturn(DiscoverySpec::PM_NAME); }
public function addMethod(PaymentMethodInterface $method) { $this->availableMethods[$method->getId()] = $this->getTranslator()->trans($method->getName()); $this->methods[$method->getId()] = $method; return $this; }