WordPress.org

Make WordPress Core

Changeset 699 in tests


Ignore:
Timestamp:
04/27/12 00:10:27 (2 years ago)
Author:
ryan
Message:

Update post thumbnail tests to reflects changes made for #WP20409. Props maxcutler.

Location:
wp-testcase/test-xmlrpc-api
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test-xmlrpc-api/test_mw_getPost.php

    r684 r699  
    8989 
    9090        $this->assertEquals( '', $result['wp_post_thumbnail'] ); 
    91         $this->assertEquals( '', $result['wp_post_thumbnail_url'] ); 
    9291 
    9392        remove_theme_support( 'post-thumbnails' ); 
     
    121120        $this->assertEquals( $attachment_id, $result['wp_post_thumbnail'] ); 
    122121 
    123         $this->assertInternalType( 'string', $result['wp_post_thumbnail_url'] ); 
    124         $this->assertEquals( wp_get_attachment_url( $attachment_id ), $result['wp_post_thumbnail_url'] ); 
    125  
    126122        delete_post_thumbnail( $this->post_id ); 
    127123        remove_theme_support( 'post-thumbnails' ); 
  • wp-testcase/test-xmlrpc-api/test_mw_getRecentPosts.php

    r684 r699  
    8585 
    8686            $this->assertEquals( '', $result['wp_post_thumbnail'] ); 
    87             $this->assertEquals( '', $result['wp_post_thumbnail_url'] ); 
    8887        } 
    8988 
     
    115114            $this->assertInternalType( 'string', $result['wp_post_thumbnail'] ); 
    116115            $this->assertStringMatchesFormat( '%d', $result['wp_post_thumbnail'] ); 
    117             $this->assertInternalType( 'string', $result['wp_post_thumbnail_url'] ); 
    118116 
    119117            if( ! empty( $result['wp_post_thumbnail'] ) || $result['postid'] == $this->post_id ) { 
     
    121119 
    122120                $this->assertEquals( $attachment_id, $result['wp_post_thumbnail'] ); 
    123                 $this->assertEquals( wp_get_attachment_url( $attachment_id ), $result['wp_post_thumbnail_url'] ); 
    124121            } 
    125122        } 
  • wp-testcase/test-xmlrpc-api/test_wp_getPost.php

    r684 r699  
    6060        $this->assertInternalType( 'bool', $result['sticky'] ); 
    6161        $this->assertInternalType( 'string', $result['post_format'] ); 
    62         $this->assertInternalType( 'string', $result['post_thumbnail'] ); 
     62        $this->assertInternalType( 'array', $result['post_thumbnail'] ); 
    6363 
    6464        // Check expected values 
     
    7171        $this->assertEquals( $this->post_data['post_content'], $result['post_content'] ); 
    7272        $this->assertEquals( url_to_postid( $result['link'] ), $this->post_id ); 
    73         $this->assertEquals( '', $result['post_thumbnail'] ); 
    7473 
    7574        remove_theme_support( 'post-thumbnails' ); 
Note: See TracChangeset for help on using the changeset viewer.