Make WordPress Core

Changeset 1040 in tests for trunk/tests/xmlrpc/mw/editPost.php


Ignore:
Timestamp:
09/22/2012 04:33:44 PM (14 years ago)
Author:
scribu
Message:

replace calls to deprecated wp_get_single_post() with get_post()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/xmlrpc/mw/editPost.php

    r904 r1040  
    2424        $this->assertTrue($result);
    2525
    26         $out = wp_get_single_post( $post_id );
     26        $out = get_post( $post_id );
    2727        $this->assertEquals( $new_title, $out->post_title );
    2828    }
     
    4141        $this->assertTrue($result);
    4242
    43         $out = wp_get_single_post( $post_id );
     43        $out = get_post( $post_id );
    4444        $this->assertEquals( $new_title, $out->post_title );
    4545    }
     
    5959        $this->assertEquals( 401, $result->code );
    6060
    61         $out = wp_get_single_post( $post_id );
     61        $out = get_post( $post_id );
    6262        $this->assertEquals( $original_title, $out->post_title );
    6363    }
     
    7676        $this->assertTrue($result);
    7777
    78         $out = wp_get_single_post( $post_id );
     78        $out = get_post( $post_id );
    7979        $this->assertEquals( $author_id, $out->post_author );
    8080    }
     
    9292        $this->assertEquals( 401, $result->code );
    9393
    94         $out = wp_get_single_post( $post_id );
     94        $out = get_post( $post_id );
    9595        $this->assertEquals( $contributor_id, $out->post_author );
    9696    }
     
    162162        $this->assertTrue($result);
    163163
    164         $out = wp_get_single_post( $post_id );
     164        $out = get_post( $post_id );
    165165        $this->assertEquals( $post2['title'], $out->post_title );
    166166
     
    170170        $this->assertTrue($result);
    171171
    172         $out = wp_get_single_post( $post_id );
     172        $out = get_post( $post_id );
    173173        $this->assertEquals( $post2['title'], $out->post_title );
    174174        $this->assertEquals( $post3['description'], $out->post_content );
     
    179179        $this->assertTrue($result);
    180180
    181         $out = wp_get_single_post( $post_id );
     181        $out = get_post( $post_id );
    182182        $this->assertEquals( $post2['title'], $out->post_title );
    183183        $this->assertEquals( $post3['description'], $out->post_content );
Note: See TracChangeset for help on using the changeset viewer.