File tree Expand file tree Collapse file tree 10 files changed +79
-2
lines changed Expand file tree Collapse file tree 10 files changed +79
-2
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
class Tests_Date_CurrentTime extends WP_UnitTestCase {
9
9
10
+ /**
11
+ * Clean up.
12
+ */
13
+ public function tear_down () {
14
+ // Reset changed options to their default value.
15
+ update_option ( 'gmt_offset ' , 0 );
16
+ update_option ( 'timezone_string ' , '' );
17
+
18
+ parent ::tear_down ();
19
+ }
20
+
10
21
/**
11
22
* @ticket 34378
12
23
*/
Original file line number Diff line number Diff line change 7
7
*/
8
8
class Tests_Date_DateI18n extends WP_UnitTestCase {
9
9
10
+ /**
11
+ * Clean up.
12
+ */
13
+ public function tear_down () {
14
+ // Reset changed options to their default value.
15
+ update_option ( 'gmt_offset ' , 0 );
16
+ update_option ( 'timezone_string ' , '' );
17
+
18
+ parent ::tear_down ();
19
+ }
20
+
10
21
/**
11
22
* @ticket 28636
12
23
*/
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Tests_Date_GetFeedBuildDate extends WP_UnitTestCase {
11
11
public function tear_down () {
12
12
global $ wp_query ;
13
13
14
- update_option ( 'timezone_string ' , 'UTC ' );
14
+ update_option ( 'timezone_string ' , '' );
15
15
16
16
unset( $ wp_query );
17
17
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Tests_Date_GetPermalink extends WP_UnitTestCase {
10
10
11
11
public function tear_down () {
12
12
delete_option ( 'permalink_structure ' );
13
- update_option ( 'timezone_string ' , 'UTC ' );
13
+ update_option ( 'timezone_string ' , '' );
14
14
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
15
15
date_default_timezone_set ( 'UTC ' );
16
16
Original file line number Diff line number Diff line change 9
9
*/
10
10
class Tests_Date_GetPostTime extends WP_UnitTestCase {
11
11
12
+ /**
13
+ * Clean up.
14
+ */
15
+ public function tear_down () {
16
+ // Reset the timezone option to the default value.
17
+ update_option ( 'timezone_string ' , '' );
18
+
19
+ parent ::tear_down ();
20
+ }
21
+
12
22
/**
13
23
* @ticket 28310
14
24
*/
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ public function tear_down() {
11
11
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
12
12
date_default_timezone_set ( 'UTC ' );
13
13
14
+ // Reset the timezone option to the default value.
15
+ update_option ( 'timezone_string ' , '' );
16
+
14
17
parent ::tear_down ();
15
18
}
16
19
Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ public function set_up() {
21
21
$ this ->q = new WP_Date_Query ( array ( 'm ' => 2 ) );
22
22
}
23
23
24
+ /**
25
+ * Clean up.
26
+ */
27
+ public function tear_down () {
28
+ // Reset the timezone option to the default value.
29
+ update_option ( 'timezone_string ' , '' );
30
+
31
+ parent ::tear_down ();
32
+ }
33
+
24
34
public function test_construct_date_query_empty () {
25
35
$ q = new WP_Date_Query ( array () );
26
36
$ this ->assertSame ( 'AND ' , $ q ->relation );
Original file line number Diff line number Diff line change 8
8
*/
9
9
class Tests_Date_wpTimezone extends WP_UnitTestCase {
10
10
11
+ /**
12
+ * Clean up.
13
+ */
14
+ public function tear_down () {
15
+ // Reset changed options to their default value.
16
+ update_option ( 'gmt_offset ' , 0 );
17
+ update_option ( 'timezone_string ' , '' );
18
+
19
+ parent ::tear_down ();
20
+ }
21
+
11
22
/**
12
23
* @ticket 24730
13
24
*
Original file line number Diff line number Diff line change 8
8
*/
9
9
class Tests_Date_XMLRPC extends WP_XMLRPC_UnitTestCase {
10
10
11
+ /**
12
+ * Clean up.
13
+ */
14
+ public function tear_down () {
15
+ // Reset the timezone option to the default value.
16
+ update_option ( 'timezone_string ' , '' );
17
+
18
+ parent ::tear_down ();
19
+ }
20
+
11
21
/**
12
22
* @ticket 30429
13
23
*
Original file line number Diff line number Diff line change 6
6
*/
7
7
class Tests_Formatting_Date extends WP_UnitTestCase {
8
8
9
+ /**
10
+ * Clean up.
11
+ */
12
+ public function tear_down () {
13
+ // Reset changed options to their default value.
14
+ update_option ( 'gmt_offset ' , 0 );
15
+ update_option ( 'timezone_string ' , '' );
16
+
17
+ parent ::tear_down ();
18
+ }
19
+
9
20
/**
10
21
* Unpatched, this test passes only when Europe/London is not observing DST.
11
22
*
You can’t perform that action at this time.
0 commit comments