public function testImportOrderPaymentWithoutMethodCode() { $baData = ['billing_agreement_id' => 'B-5E3253653W103435Y']; $paymentMock = $this->importOrderPaymentCommonPart($baData); $paymentMock->expects($this->exactly(2))->method('getMethodInstance')->willReturn($this->paymentMethodInstanceMock); $this->paymentMethodInstanceMock->expects($this->once())->method('getCode')->willReturn('paypal_billing_agreement'); $this->assertSame($this->model, $this->model->importOrderPayment($paymentMock)); }