Changeset 48937 for trunk/tests/phpunit/tests/date/getPostTime.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/getPostTime.php
r48912 r48937 14 14 $post_id = self::factory()->post->create( array( 'post_date' => '2014-03-01 16:35:00' ) ); 15 15 16 $this->assert Equals( '16:35:00', get_post_time( 'H:i:s', false, $post_id ) );16 $this->assertSame( '16:35:00', get_post_time( 'H:i:s', false, $post_id ) ); 17 17 } 18 18 … … 33 33 $post_id = self::factory()->post->create( array( 'post_date' => '2014-03-01 16:35:00' ) ); 34 34 35 $this->assert Equals( '16:35:00', get_post_modified_time( 'H:i:s', false, $post_id ) );35 $this->assertSame( '16:35:00', get_post_modified_time( 'H:i:s', false, $post_id ) ); 36 36 } 37 37 … … 65 65 ); 66 66 67 $this->assert Equals( $wp_timestamp, get_post_time( 'U', false, $post_id ) );68 $this->assert Equals( $wp_timestamp, get_post_time( 'G', false, $post_id ) );69 $this->assert Equals( $timestamp, get_post_time( 'U', true, $post_id ) );70 $this->assert Equals( $timestamp, get_post_time( 'G', true, $post_id ) );71 $this->assert Equals( $wp_timestamp, get_post_modified_time( 'U', false, $post_id ) );72 $this->assert Equals( $wp_timestamp, get_post_modified_time( 'G', false, $post_id ) );73 $this->assert Equals( $timestamp, get_post_modified_time( 'U', true, $post_id ) );74 $this->assert Equals( $timestamp, get_post_modified_time( 'G', true, $post_id ) );67 $this->assertSame( $wp_timestamp, get_post_time( 'U', false, $post_id ) ); 68 $this->assertSame( $wp_timestamp, get_post_time( 'G', false, $post_id ) ); 69 $this->assertSame( $timestamp, get_post_time( 'U', true, $post_id ) ); 70 $this->assertSame( $timestamp, get_post_time( 'G', true, $post_id ) ); 71 $this->assertSame( $wp_timestamp, get_post_modified_time( 'U', false, $post_id ) ); 72 $this->assertSame( $wp_timestamp, get_post_modified_time( 'G', false, $post_id ) ); 73 $this->assertSame( $timestamp, get_post_modified_time( 'U', true, $post_id ) ); 74 $this->assertSame( $timestamp, get_post_modified_time( 'G', true, $post_id ) ); 75 75 } 76 76 … … 93 93 ); 94 94 95 $this->assert Equals( $rfc3339, get_post_time( DATE_RFC3339, false, $post_id ) );96 $this->assert Equals( $rfc3339_utc, get_post_time( DATE_RFC3339, true, $post_id ) );97 $this->assert Equals( $rfc3339, get_post_time( DATE_RFC3339, false, $post_id, true ) );98 $this->assert Equals( $rfc3339_utc, get_post_time( DATE_RFC3339, true, $post_id, true ) );99 $this->assert Equals( $rfc3339, get_post_modified_time( DATE_RFC3339, false, $post_id ) );100 $this->assert Equals( $rfc3339_utc, get_post_modified_time( DATE_RFC3339, true, $post_id ) );101 $this->assert Equals( $rfc3339, get_post_modified_time( DATE_RFC3339, false, $post_id, true ) );102 $this->assert Equals( $rfc3339_utc, get_post_modified_time( DATE_RFC3339, true, $post_id, true ) );95 $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, false, $post_id ) ); 96 $this->assertSame( $rfc3339_utc, get_post_time( DATE_RFC3339, true, $post_id ) ); 97 $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, false, $post_id, true ) ); 98 $this->assertSame( $rfc3339_utc, get_post_time( DATE_RFC3339, true, $post_id, true ) ); 99 $this->assertSame( $rfc3339, get_post_modified_time( DATE_RFC3339, false, $post_id ) ); 100 $this->assertSame( $rfc3339_utc, get_post_modified_time( DATE_RFC3339, true, $post_id ) ); 101 $this->assertSame( $rfc3339, get_post_modified_time( DATE_RFC3339, false, $post_id, true ) ); 102 $this->assertSame( $rfc3339_utc, get_post_modified_time( DATE_RFC3339, true, $post_id, true ) ); 103 103 } 104 104 … … 122 122 update_option( 'timezone_string', 'Europe/Kiev' ); 123 123 124 $this->assert Equals( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) );125 $this->assert Equals( $rfc3339, get_post_modified_time( DATE_RFC3339, true, $post_id ) );124 $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) ); 125 $this->assertSame( $rfc3339, get_post_modified_time( DATE_RFC3339, true, $post_id ) ); 126 126 } 127 127 }
Note: See TracChangeset
for help on using the changeset viewer.