Changeset 34762 for trunk/tests/phpunit/tests/post.php
- Timestamp:
- 10/02/2015 04:35:34 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post.php
r34085 r34762 1219 1219 $this->assertEquals( $this->author_id, get_post( $post_id )->post_author ); 1220 1220 } 1221 1222 /** 1223 * @ticket 15946 1224 */ 1225 function test_wp_insert_post_should_respect_post_date_gmt() { 1226 $post = array( 1227 'post_author' => $this->author_id, 1228 'post_status' => 'publish', 1229 'post_content' => rand_str(), 1230 'post_title' => rand_str(), 1231 'post_date_gmt' => '2014-01-01 12:00:00', 1232 ); 1233 1234 // insert a post and make sure the ID is ok 1235 $id = wp_insert_post($post); 1236 1237 $out = get_post($id); 1238 1239 $this->assertEquals($post['post_content'], $out->post_content); 1240 $this->assertEquals($post['post_title'], $out->post_title); 1241 $this->assertEquals($post['post_author'], $out->post_author); 1242 $this->assertEquals(get_date_from_gmt($post['post_date_gmt']), $out->post_date); 1243 $this->assertEquals($post['post_date_gmt'], $out->post_date_gmt); 1244 } 1221 1245 }
Note: See TracChangeset
for help on using the changeset viewer.