public function testAuthorize() { $paymentAction = 'some_action'; $this->scopeConfigMock->expects($this->any())->method('getValue')->with('payment/authorizenet_directpost/payment_action', 'store', null)->willReturn($paymentAction); $this->paymentMock->expects($this->once())->method('setAdditionalInformation')->with('payment_type', $paymentAction); $this->directpost->authorize($this->paymentMock, 10); }