Skip to content

Commit

Permalink
fix tests IV
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov committed Apr 29, 2024
1 parent 1ea3ced commit bc17874
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use WCPay\Core\Server\Request\Create_And_Confirm_Intention;
use WCPay\Constants\Payment_Method;
use WCPay\Duplicate_Payment_Prevention_Service;
use WCPay\Duplicates_Detection_Service;
use WCPay\Session_Rate_Limiter;
use WCPay\Fraud_Prevention\Fraud_Prevention_Service;
use WCPay\Payment_Methods\CC_Payment_Method;
Expand Down Expand Up @@ -153,6 +154,7 @@ public function set_up() {
$mock_dpps,
$this->createMock( WC_Payments_Localization_Service::class ),
$this->createMock( WC_Payments_Fraud_Service::class ),
$this->createMock( Duplicates_Detection_Service::class ),
]
)
->setMethods(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use WCPay\Exceptions\Connection_Exception;
use WCPay\Session_Rate_Limiter;
use WCPay\Constants\Payment_Method;
use WCPay\Duplicates_Detection_Service;
use WCPay\Payment_Methods\CC_Payment_Method;

// Need to use WC_Mock_Data_Store.
Expand Down Expand Up @@ -167,6 +168,7 @@ public function set_up() {
$this->mock_dpps,
$this->createMock( WC_Payments_Localization_Service::class ),
$this->createMock( WC_Payments_Fraud_Service::class ),
$this->createMock( Duplicates_Detection_Service::class ),
]
)
->setMethods(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

use WCPay\Duplicate_Payment_Prevention_Service;
use WCPay\Duplicates_Detection_Service;
use WCPay\Payment_Methods\CC_Payment_Method;
use WCPay\Session_Rate_Limiter;

Expand Down Expand Up @@ -139,7 +140,8 @@ public function set_up() {
$this->mock_order_service,
$mock_dpps,
$this->createMock( WC_Payments_Localization_Service::class ),
$this->createMock( WC_Payments_Fraud_Service::class )
$this->createMock( WC_Payments_Fraud_Service::class ),
$this->createMock( Duplicates_Detection_Service::class ),
);
$this->wcpay_gateway->init_hooks();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use WCPay\Constants\Order_Status;
use WCPay\Constants\Intent_Status;
use WCPay\Duplicate_Payment_Prevention_Service;
use WCPay\Duplicates_Detection_Service;
use WCPay\Payment_Methods\CC_Payment_Method;
use WCPay\Session_Rate_Limiter;

Expand Down Expand Up @@ -160,6 +161,7 @@ public function set_up() {
$mock_dpps,
$this->createMock( WC_Payments_Localization_Service::class ),
$this->createMock( WC_Payments_Fraud_Service::class ),
$this->createMock( Duplicates_Detection_Service::class ),
]
)
->setMethods(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use PHPUnit\Framework\MockObject\MockObject;
use WCPay\Core\Server\Request\Create_And_Confirm_Intention;
use WCPay\Duplicate_Payment_Prevention_Service;
use WCPay\Duplicates_Detection_Service;
use WCPay\Exceptions\API_Exception;
use WCPay\Internal\Service\Level3Service;
use WCPay\Internal\Service\OrderService;
Expand Down Expand Up @@ -156,7 +157,8 @@ public function set_up() {
$this->order_service,
$this->mock_dpps,
$this->mock_localization_service,
$this->mock_fraud_service
$this->mock_fraud_service,
$this->createMock( Duplicates_Detection_Service::class ),
);
$this->wcpay_gateway->init_hooks();
WC_Payments::set_gateway( $this->wcpay_gateway );
Expand Down

0 comments on commit bc17874

Please sign in to comment.