File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,33 @@ class WC_Stripe_Payment_Method_Configurations_Test extends WP_UnitTestCase {
9
9
* @return void
10
10
*/
11
11
public function test_get_parent_configuration_id () {
12
- $ this ->assertNull ( WC_Stripe_Payment_Method_Configurations::get_parent_configuration_id () );
12
+ $ initial_settings = WC_Stripe_Helper::get_stripe_settings ();
13
+
14
+ WC_Stripe_Helper::update_main_stripe_settings (
15
+ array_merge (
16
+ $ initial_settings ,
17
+ [ 'testmode ' => 'yes ' ]
18
+ )
19
+ );
20
+
21
+ $ this ->assertEquals (
22
+ WC_Stripe_Payment_Method_Configurations::TEST_MODE_CONFIGURATION_PARENT_ID ,
23
+ WC_Stripe_Payment_Method_Configurations::get_parent_configuration_id ()
24
+ );
25
+
26
+ WC_Stripe_Helper::update_main_stripe_settings (
27
+ array_merge (
28
+ $ initial_settings ,
29
+ [ 'testmode ' => 'no ' ]
30
+ )
31
+ );
32
+
33
+ $ this ->assertEquals (
34
+ WC_Stripe_Payment_Method_Configurations::LIVE_MODE_CONFIGURATION_PARENT_ID ,
35
+ WC_Stripe_Payment_Method_Configurations::get_parent_configuration_id ()
36
+ );
37
+
38
+ WC_Stripe_Helper::update_main_stripe_settings ( $ initial_settings );
13
39
}
14
40
15
41
/**
You can’t perform that action at this time.
0 commit comments