@@ -83,12 +83,16 @@ public function test_validate_option_name( string $option, bool $expected_result
8383 */
8484 public function provider_valid_values (): array {
8585 return [
86- 'bool option with true ' => [ 'wcpay_multi_currency_setup_completed ' , true ],
87- 'bool option with false ' => [ 'wcpay_multi_currency_setup_completed ' , false ],
88- 'array option with empty array ' => [ 'woocommerce_dismissed_todo_tasks ' , [] ],
89- 'array option with array ' => [ 'woocommerce_dismissed_todo_tasks ' , [ 'key ' => 'value ' ] ],
90- 'array option with nested array ' => [ 'woocommerce_dismissed_todo_tasks ' , [ 'key ' => [ 'nested ' => 'value ' ] ] ],
91- 'string option with string ' => [ 'wcpay_exit_survey_last_shown ' , '2026-01-09T09:23:30.444Z ' ],
86+ 'bool option with true ' => [ 'wcpay_multi_currency_setup_completed ' , true ],
87+ 'bool option with false ' => [ 'wcpay_multi_currency_setup_completed ' , false ],
88+ 'array option with empty array ' => [ 'woocommerce_dismissed_todo_tasks ' , [] ],
89+ 'array option with array ' => [ 'woocommerce_dismissed_todo_tasks ' , [ 'key ' => 'value ' ] ],
90+ 'array option with nested array ' => [ 'woocommerce_dismissed_todo_tasks ' , [ 'key ' => [ 'nested ' => 'value ' ] ] ],
91+ 'string option with string ' => [ 'wcpay_exit_survey_last_shown ' , '2026-01-09T09:23:30.444Z ' ],
92+ 'array option for dismissed duplicate notices ' => [
93+ 'wcpay_duplicate_payment_method_notices_dismissed ' ,
94+ [ 'card ' => [ 'woocommerce_payments ' , 'stripe ' ] ],
95+ ],
9296 ];
9397 }
9498
@@ -110,14 +114,15 @@ public function test_validate_value_with_valid_values( string $option_name, $val
110114 */
111115 public function provider_invalid_values (): array {
112116 return [
113- 'bool option with string ' => [ 'wcpay_multi_currency_setup_completed ' , 'string ' ],
114- 'bool option with array ' => [ 'wcpay_multi_currency_setup_completed ' , [] ],
115- 'bool option with int ' => [ 'wcpay_multi_currency_setup_completed ' , 123 ],
116- 'array option with bool ' => [ 'woocommerce_dismissed_todo_tasks ' , true ],
117- 'array option with string ' => [ 'woocommerce_dismissed_todo_tasks ' , 'string ' ],
118- 'string option with bool ' => [ 'wcpay_exit_survey_last_shown ' , true ],
119- 'string option with array ' => [ 'wcpay_exit_survey_last_shown ' , [] ],
120- 'string option with int ' => [ 'wcpay_exit_survey_last_shown ' , 123 ],
117+ 'bool option with string ' => [ 'wcpay_multi_currency_setup_completed ' , 'string ' ],
118+ 'bool option with array ' => [ 'wcpay_multi_currency_setup_completed ' , [] ],
119+ 'bool option with int ' => [ 'wcpay_multi_currency_setup_completed ' , 123 ],
120+ 'array option with bool ' => [ 'woocommerce_dismissed_todo_tasks ' , true ],
121+ 'array option with string ' => [ 'woocommerce_dismissed_todo_tasks ' , 'string ' ],
122+ 'string option with bool ' => [ 'wcpay_exit_survey_last_shown ' , true ],
123+ 'string option with array ' => [ 'wcpay_exit_survey_last_shown ' , [] ],
124+ 'string option with int ' => [ 'wcpay_exit_survey_last_shown ' , 123 ],
125+ 'array option (dismissed notices) with bool ' => [ 'wcpay_duplicate_payment_method_notices_dismissed ' , true ],
121126 ];
122127 }
123128
0 commit comments