Skip to content

Commit

Permalink
Added charge test for Duitnow OBW.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashish committed Oct 11, 2023
1 parent 7eb6401 commit 5d3543d
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

require_once __DIR__ . '/class-omise-offsite-test.php';

class Omise_Payment_DuitNow_OBW_Test extends Omise_Offsite_Test
{
public function setUp(): void
{
$this->sourceType = 'duitnow_obw';
parent::setUp();
require_once __DIR__ . '/../../../../includes/gateway/class-omise-payment-duitnow-obw.php';

// if (!function_exists('wp_enqueue_script')) {
// function wp_enqueue_script() {}
// }

// if (!function_exists('plugins_url')) {
// function plugins_url() {}
// }

// dummy version
// if (!defined('WC_VERSION')) {
// define('WC_VERSION', '1.0.0');
// }
}

public function testCharge()
{
$_POST['source'] = ['bank' => 'SCB'];
$obj = new Omise_Payment_DuitNow_OBW();
$this->getChargeTest($obj);
}
}

0 comments on commit 5d3543d

Please sign in to comment.