Make WordPress Core

Changeset 412 in tests


Ignore:
Timestamp:
08/06/2011 02:43:30 PM (15 years ago)
Author:
duck_
Message:

Fix WPTestIncludesPost when running whole suite, see #14.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_post.php

    r407 r412  
    66        function setUp() {
    77                parent::setUp();
    8                 $this->author = get_userdatabylogin(WP_USER_NAME);
     8                $this->author_id = $this->_make_user('editor');
    99                _set_cron_array(array());
    1010                $this->post_ids = array();
    … …  
    1515                foreach ($this->post_ids as $id)
    1616                        wp_delete_post($id);
     17                wp_delete_user( $this->author_id );
    1718        }
    1819
    … …  
    2627        function test_vb_insert_get() {
    2728                $post = array(
    28                         'post_author' => $this->author->ID,
     29                        'post_author' => $this->author_id,
    2930                        'post_status' => 'publish',
    3031                        'post_content' => rand_str(),
    … …  
    5354
    5455                $post = array(
    55                         'post_author' => $this->author->ID,
     56                        'post_author' => $this->author_id,
    5657                        'post_status' => 'publish',
    5758                        'post_content' => rand_str(),
    … …  
    8889
    8990                $post = array(
    90                         'post_author' => $this->author->ID,
     91                        'post_author' => $this->author_id,
    9192                        'post_status' => 'publish',
    9293                        'post_content' => rand_str(),
    … …  
    122123        }
    123124
    124 function test_vb_insert_future_edit_bug() {
     125        function test_vb_insert_future_edit_bug() {
    125126                // future post bug: posts get published at the wrong time if you edit the timestamp
    126127                // http://trac.wordpress.org/ticket/4710
    … …  
    130131
    131132                $post = array(
    132                         'post_author' => $this->author->ID,
     133                        'post_author' => $this->author_id,
    133134                        'post_status' => 'publish',
    134135                        'post_content' => rand_str(),
    … …  
    170171
    171172                $post = array(
    172                         'post_author' => $this->author->ID,
     173                        'post_author' => $this->author_id,
    173174                        'post_status' => 'draft',
    174175                        'post_content' => rand_str(),
    … …  
    202203
    203204                $post = array(
    204                         'post_author' => $this->author->ID,
     205                        'post_author' => $this->author_id,
    205206                        'post_status' => 'publish',
    206207                        'post_content' => rand_str(),
    … …  
    243244                foreach ($statuses as $status) {
    244245                        $post = array(
    245                                 'post_author' => $this->author->ID,
     246                                'post_author' => $this->author_id,
    246247                                'post_status' => 'publish',
    247248                                'post_content' => rand_str(),
    … …  
    283284
    284285                $post = array(
    285                         'post_author' => $this->author->ID,
     286                        'post_author' => $this->author_id,
    286287                        'post_status' => 'private',
    287288                        'post_content' => rand_str(),
    … …  
    314315
    315316                $post = array(
    316                         'post_author' => $this->author->ID,
     317                        'post_author' => $this->author_id,
    317318                        'post_status' => 'publish',
    318319                        'post_content' => rand_str(),
    … …  
    356357
    357358                $post = array(
    358                         'post_author' => $this->author->ID,
     359                        'post_author' => $this->author_id,
    359360                        'post_status' => 'publish',
    360361                        'post_content' => rand_str(),
    … …  
    383384
    384385                $post = array(
    385                         'post_author' => $this->author->ID,
     386                        'post_author' => $this->author_id,
    386387                        'post_status' => 'publish',
    387388                        'post_content' => rand_str(),
Note: See TracChangeset for help on using the changeset viewer.