diff --git a/Test/Unit/PaymentDataBuilderTest.php b/Test/Unit/PaymentDataBuilderTest.php index 6ad111ee..383bc7b5 100644 --- a/Test/Unit/PaymentDataBuilderTest.php +++ b/Test/Unit/PaymentDataBuilderTest.php @@ -18,6 +18,7 @@ use Magento\Store\Api\Data\StoreInterface; use Omise\Payment\Model\Config\Installment; use Omise\Payment\Model\Config\Promptpay; +use Omise\Payment\Model\Capabilities; class PaymentDataBuilderTest extends TestCase { @@ -30,6 +31,7 @@ class PaymentDataBuilderTest extends TestCase private $configMock; private $storeManagerMock; private $storeMock; + private $capabilities; protected function setUp(): void { @@ -42,6 +44,7 @@ protected function setUp(): void $this->orderMock = m::mock(OrderInterface::class); $this->storeManagerMock = m::mock(StoreManagerInterface::class); $this->storeMock = m::mock(StoreInterface::class); + $this->capabilities = m::mock(Capabilities::class); } /** @@ -97,7 +100,11 @@ public function testBuild($paymentMethod, $expectedMetadata) $this->paymentDataMock->shouldReceive('getOrder')->andReturn($this->orderMock); $this->paymentDataMock->shouldReceive('getPayment')->andReturn($this->paymentMock); - $model = new PaymentDataBuilder($this->ccConfigMock, $this->omiseMoneyMock); + $model = new PaymentDataBuilder( + $this->ccConfigMock, + $this->omiseMoneyMock, + $this->capabilities + ); $result = $model->build(['payment' => $this->paymentDataMock]); $this->assertEquals(100000, $result['amount']);