From 24c3cc56fd94fe37c675acd2f5b845f79ad396ed Mon Sep 17 00:00:00 2001 From: Steve Grunwell Date: Mon, 27 Apr 2020 15:44:55 +0000 Subject: [PATCH] Add @group annotations for tests around Intervals --- tests/OrderLimiterTest.php | 13 +++++++++++++ tests/SettingsTest.php | 1 + 2 files changed, 14 insertions(+) diff --git a/tests/OrderLimiterTest.php b/tests/OrderLimiterTest.php index ca00e8d..d283a66 100644 --- a/tests/OrderLimiterTest.php +++ b/tests/OrderLimiterTest.php @@ -29,6 +29,7 @@ public function reset_wc_notices() { /** * @test * @testdox get_interval() should return the interval setting + * @group Intervals */ public function get_interval_should_return_the_interval_setting() { update_option( OrderLimiter::OPTION_KEY, [ @@ -206,6 +207,7 @@ public function get_remaining_orders_should_return_zero_if_limits_are_met_or_exc /** * @test + * @group Intervals */ public function get_interval_start_for_daily() { update_option( OrderLimiter::OPTION_KEY, [ @@ -224,6 +226,7 @@ public function get_interval_start_for_daily() { /** * @test + * @group Intervals */ public function get_interval_start_for_weekly() { update_option( 'week_starts_on', 1 ); @@ -244,6 +247,7 @@ public function get_interval_start_for_weekly() { /** * @test + * @group Intervals */ public function get_interval_start_for_weekly_with_a_non_standard_day() { update_option( 'week_starts_on', 6 ); @@ -264,6 +268,7 @@ public function get_interval_start_for_weekly_with_a_non_standard_day() { /** * @test + * @group Intervals */ public function get_interval_start_for_weekly_when_today_is_the_first_day_of_the_week() { update_option( 'week_starts_on', 1 ); @@ -284,6 +289,7 @@ public function get_interval_start_for_weekly_when_today_is_the_first_day_of_the /** * @test + * @group Intervals */ public function get_interval_start_for_monthly() { $today = new \DateTimeImmutable( 'now', wp_timezone() ); @@ -301,6 +307,7 @@ public function get_interval_start_for_monthly() { /** * @test + * @group Intervals */ public function get_interval_start_should_be_idempotent() { $now = new \DateTimeImmutable( '00:00:00', wp_timezone() ); @@ -320,6 +327,7 @@ public function get_interval_start_should_be_idempotent() { /** * @test + * @group Intervals */ public function get_next_interval_start_for_daily() { update_option( OrderLimiter::OPTION_KEY, [ @@ -339,6 +347,7 @@ public function get_next_interval_start_for_daily() { /** * @test + * @group Intervals */ public function get_next_interval_start_for_weekly() { update_option( 'week_starts_on', 1 ); @@ -359,6 +368,7 @@ public function get_next_interval_start_for_weekly() { /** * @test + * @group Intervals */ public function get_next_interval_start_for_monthly() { update_option( OrderLimiter::OPTION_KEY, [ @@ -378,6 +388,7 @@ public function get_next_interval_start_for_monthly() { /** * @test + * @group Intervals */ public function get_seconds_until_next_interval_for_daily() { update_option( OrderLimiter::OPTION_KEY, [ @@ -397,6 +408,7 @@ public function get_seconds_until_next_interval_for_daily() { /** * @test + * @group Intervals */ public function get_seconds_until_next_interval_for_weekly() { update_option( 'week_starts_on', 1 ); @@ -417,6 +429,7 @@ public function get_seconds_until_next_interval_for_weekly() { /** * @test + * @group Intervals */ public function get_seconds_until_next_interval_for_monthly() { update_option( OrderLimiter::OPTION_KEY, [ diff --git a/tests/SettingsTest.php b/tests/SettingsTest.php index 4e81942..56bc5a8 100644 --- a/tests/SettingsTest.php +++ b/tests/SettingsTest.php @@ -30,6 +30,7 @@ public function the_options_should_be_added_to_their_own_page() { /** * @test + * @group Intervals */ public function available_intervals_should_be_filterable() { $intervals = [