Changeset 48937 for trunk/tests/phpunit/tests/date/getTheModifiedDate.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/getTheModifiedDate.php
r48924 r48937 24 24 $expected = '2016-01-21'; 25 25 $actual = get_the_modified_date( $format, $post_id ); 26 $this->assert Equals( $expected, $actual );26 $this->assertSame( $expected, $actual ); 27 27 } 28 28 … … 47 47 $format = 'Y-m-d'; 48 48 $actual = get_the_modified_date( $format ); 49 $this->assert Equals( $expected, $actual );49 $this->assertSame( $expected, $actual ); 50 50 } 51 51 … … 64 64 add_filter( 'get_the_modified_date', array( $this, '_filter_get_the_modified_date_failure' ) ); 65 65 $actual = get_the_modified_date(); 66 $this->assert Equals( $expected, $actual );66 $this->assertSame( $expected, $actual ); 67 67 remove_filter( 'get_the_modified_date', array( $this, '_filter_get_the_modified_date_failure' ) ); 68 68 } … … 71 71 $expected = false; 72 72 $actual = $the_date; 73 $this->assert Equals( $expected, $actual );73 $this->assertSame( $expected, $actual ); 74 74 75 75 if ( false === $the_date ) { … … 95 95 $post_id = self::factory()->post->create( array( 'post_date' => '2020-08-31 23:14:00' ) ); 96 96 97 $this->assert Equals( 'August 31, 2020', get_the_modified_date( '', $post_id ) );98 $this->assert Equals( 'August 31, 2020', get_the_modified_date( false, $post_id ) );97 $this->assertSame( 'August 31, 2020', get_the_modified_date( '', $post_id ) ); 98 $this->assertSame( 'August 31, 2020', get_the_modified_date( false, $post_id ) ); 99 99 } 100 100 … … 113 113 $post_id = $this->factory->post->create( $details ); 114 114 $format = 'G'; 115 $expected = '1453390476';115 $expected = 1453390476; 116 116 $actual = get_the_modified_time( $format, $post_id ); 117 $this->assert Equals( $expected, $actual );117 $this->assertSame( $expected, $actual ); 118 118 } 119 119 … … 135 135 $GLOBALS['post'] = $post; 136 136 137 $expected = '1453390476';137 $expected = 1453390476; 138 138 $format = 'G'; 139 139 $actual = get_the_modified_time( $format ); 140 $this->assert Equals( $expected, $actual );140 $this->assertSame( $expected, $actual ); 141 141 } 142 142 … … 155 155 add_filter( 'get_the_modified_time', array( $this, '_filter_get_the_modified_time_failure' ) ); 156 156 $actual = get_the_modified_time(); 157 $this->assert Equals( $expected, $actual );157 $this->assertSame( $expected, $actual ); 158 158 remove_filter( 'get_the_modified_time', array( $this, '_filter_get_the_modified_time_failure' ) ); 159 159 } … … 162 162 $expected = false; 163 163 $actual = $the_time; 164 $this->assert Equals( $expected, $actual );164 $this->assertSame( $expected, $actual ); 165 165 166 166 if ( false === $the_time ) { … … 186 186 $post_id = self::factory()->post->create( array( 'post_date' => '2020-08-31 23:14:00' ) ); 187 187 188 $this->assert Equals( '11:14 pm', get_the_modified_time( '', $post_id ) );189 $this->assert Equals( '11:14 pm', get_the_modified_time( false, $post_id ) );188 $this->assertSame( '11:14 pm', get_the_modified_time( '', $post_id ) ); 189 $this->assertSame( '11:14 pm', get_the_modified_time( false, $post_id ) ); 190 190 } 191 191 }
Note: See TracChangeset
for help on using the changeset viewer.