Make WordPress Core

Changeset 1326 in tests

Timestamp:
07/28/2013 11:22:34 PM (11 years ago)
Author:
alexkingorg
Message:

unit tests for #WP19373

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/post.php

    r1323 r1326  
    2020        parent::tearDown();
    2121    }
    22 
     22   
    2323    // helper function: return the timestamp(s) of cron jobs for the specified hook and post
    2424    function _next_schedule_for_post($hook, $id) {
    2525        return wp_next_scheduled('publish_future_post', array(0=>intval($id)));
    2626    }
    27 
     27   
     28    // helper function, unsets current user globally
     29    function _unset_current_user() {
     30        global $current_user, $user_ID;
     31       
     32        $current_user = $user_ID = null;
     33    }
     34   
    2835    // test simple valid behavior: insert and get a post
    2936    function test_vb_insert_get_delete() {
     
    694701        $this->assertEquals( 1, $numpages );
    695702        $this->assertEquals( array( 'Page 0' ), $pages );
     703
     704
     705
     706
     707
     708
     709
     710
     711
     712
     713
     714
     715
     716
     717
     718
     719
     720
     721
     722
     723
     724
     725
     726
     727
     728
     729
     730
     731
     732
     733
     734
     735
     736
     737
     738
     739
     740
     741
     742
     743
     744
     745
     746
     747
     748
     749
     750
     751
     752
     753
     754
     755
     756
     757
     758
     759
     760
     761
     762
     763
     764
     765
     766
     767
     768
     769
     770
     771
     772
     773
     774
     775
     776
     777
     778
     779
     780
     781
     782
     783
    696784    }
    697785
Note: See TracChangeset for help on using the changeset viewer.