Changeset 52010 for trunk/tests/phpunit/tests/date/mysql2date.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/mysql2date.php
r51568 r52010 8 8 class Tests_Date_mysql2date extends WP_UnitTestCase { 9 9 10 function tear_down() {10 public function tear_down() { 11 11 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set 12 12 date_default_timezone_set( 'UTC' ); … … 18 18 * @ticket 28310 19 19 */ 20 function test_mysql2date_returns_false_with_no_date() {20 public function test_mysql2date_returns_false_with_no_date() { 21 21 $this->assertFalse( mysql2date( 'F j, Y H:i:s', '' ) ); 22 22 } … … 25 25 * @ticket 28310 26 26 */ 27 function test_mysql2date_returns_gmt_or_unix_timestamp() {27 public function test_mysql2date_returns_gmt_or_unix_timestamp() { 28 28 $this->assertSame( 441013392, mysql2date( 'G', '1983-12-23 07:43:12' ) ); 29 29 $this->assertSame( 441013392, mysql2date( 'U', '1983-12-23 07:43:12' ) ); … … 33 33 * @ticket 28992 34 34 */ 35 function test_mysql2date_should_format_time() {35 public function test_mysql2date_should_format_time() { 36 36 $timezone = 'Europe/Kiev'; 37 37 update_option( 'timezone_string', $timezone ); … … 47 47 * @ticket 28992 48 48 */ 49 function test_mysql2date_should_format_time_with_changed_time_zone() {49 public function test_mysql2date_should_format_time_with_changed_time_zone() { 50 50 $timezone = 'Europe/Kiev'; 51 51 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set … … 63 63 * @ticket 28992 64 64 */ 65 function test_mysql2date_should_return_wp_timestamp() {65 public function test_mysql2date_should_return_wp_timestamp() { 66 66 $timezone = 'Europe/Kiev'; 67 67 update_option( 'timezone_string', $timezone ); … … 77 77 * @ticket 28992 78 78 */ 79 function test_mysql2date_should_return_unix_timestamp_for_gmt_time() {79 public function test_mysql2date_should_return_unix_timestamp_for_gmt_time() { 80 80 $timezone = 'Europe/Kiev'; 81 81 update_option( 'timezone_string', $timezone );
Note: See TracChangeset
for help on using the changeset viewer.