Reset payment gateways between tests

This commit is contained in:
claudiulodro 2018-08-27 12:05:13 -07:00
parent 2466728183
commit 0e67fd6d4d
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,11 @@ class WC_REST_Unit_Test_Case extends WC_Unit_Test_Case {
$wp_rest_server = new WP_Test_Spy_REST_Server(); $wp_rest_server = new WP_Test_Spy_REST_Server();
$this->server = $wp_rest_server; $this->server = $wp_rest_server;
do_action( 'rest_api_init' ); do_action( 'rest_api_init' );
// Reset payment gateways.
$gateways = WC_Payment_Gateways::instance();
$gateways->payment_gateways = array();
$gateways->init();
} }
/** /**