Changeset 14 in tests
- Timestamp:
- 09/20/2007 11:49:04 AM (18 years ago)
- File:
-
- 1 edited
-
wp-testcase/test_includes_post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-testcase/test_includes_post.php
r13 r14 14 14 wp_delete_post($id); 15 15 } 16 17 // helper function: return the timestamp(s) of cron jobs for the specified hook and post 18 function _next_schedule_for_post($hook, $id) { 19 return wp_next_scheduled('publish_future_post', array(0=>strval($id))); 20 } 21 16 22 17 23 // test simple valid behavior: insert and get a post … … 67 73 $this->assertEquals($post['post_date'], $out->post_date); 68 74 69 $cron = _get_cron_array(); 70 71 $this->assertTrue(is_array($cron[$future_date]['publish_future_post'])); 72 $cron_args = array_pop($cron[$future_date]['publish_future_post']); 73 $this->assertEquals(false, $cron_args['schedule']); 74 $this->assertEquals(array($id), $cron_args['args']); 75 // there should be a publish_future_post hook scheduled on the future date 76 $this->assertEquals($future_date, $this->_next_schedule_for_post('publish_future_post', $id)); 75 77 } 76 78 77 // helper function: return the timestamp(s) of cron jobs for the specified hook and post78 function _next_schedule_for_post($hook, $id) {79 return wp_next_scheduled('publish_future_post', array(0=>strval($id)));80 }81 82 79 function test_vb_insert_future_edit_bug() { 83 80 // future post bug: posts get published at the wrong time if you edit the timestamp
Note: See TracChangeset
for help on using the changeset viewer.