Changeset 35284 for trunk/tests/phpunit/tests/formatting/date.php
- Timestamp:
- 10/20/2015 06:07:45 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/formatting/date.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/date.php
r25002 r35284 48 48 $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); 49 49 } 50 51 /** 52 * @ticket 34279 53 */ 54 function test_get_date_and_time_from_gmt_no_timezone() { 55 $gmt = $local = '2012-01-01 12:34:56'; 56 $this->assertEquals( $gmt, get_date_from_gmt( $local ) ); 57 } 58 59 /** 60 * @ticket 34279 61 */ 62 function test_get_gmt_from_date_no_timezone() { 63 $gmt = '2012-12-01 00:00:00'; 64 $date = '2012-12-01'; 65 $this->assertEquals( $gmt, get_gmt_from_date( $date ) ); 66 } 67 68 /** 69 * @ticket 34279 70 */ 71 function test_get_gmt_from_date_short_date() { 72 update_option( 'timezone_string', 'Europe/London' ); 73 $local = '2012-12-01'; 74 $gmt = '2012-12-01 00:00:00'; 75 $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); 76 } 77 78 /** 79 * @ticket 34279 80 */ 81 function test_get_gmt_from_date_string_date() { 82 update_option( 'timezone_string', 'Europe/London' ); 83 $local = 'now'; 84 $gmt = gmdate( 'Y-m-d H:i:s', strtotime( 'now' ) ); 85 $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); 86 } 87 88 /** 89 * @ticket 34279 90 */ 91 function test_get_gmt_from_date_string_date_no_timezone() { 92 $local = 'now'; 93 $gmt = gmdate( 'Y-m-d H:i:s', strtotime( 'now' ) ); 94 $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); 95 } 50 96 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)