Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashish committed May 27, 2024
1 parent b6d3d07 commit f42ee9e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion includes/gateway/class-omise-payment-truemoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function __construct()
$this->title = $this->get_option( 'title' );
$this->description = $this->get_option( 'description' );
$this->restricted_countries = array( 'TH' );
$this->source_type = null;

add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
add_action( 'woocommerce_api_' . $this->id . '_callback', 'Omise_Callback::execute' );
Expand Down Expand Up @@ -85,7 +86,6 @@ public function is_wallet()
// the Capability API is not being called from WC blocks.
if (!$this->source_type) {
$this->source_type = $this->get_source();

}

return self::WALLET === $this->source_type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public function setUp(): void

public function test_get_charge_request()
{
$this->omise_capability_mock->shouldReceive('retrieve')->once();
// set source type to truemoney wallet
$obj = new Omise_Payment_Truemoney();
$obj->source_type = 'truemoney';
Expand Down

0 comments on commit f42ee9e

Please sign in to comment.