Make WordPress Core

Changeset 692 in tests for wp-testcase/test_includes_author.php


Ignore:
Timestamp:
04/20/2012 12:06:58 AM (13 years ago)
Author:
ryan
Message:

More author meta tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_author.php

    r691 r692  
    4545        setup_postdata( get_post( $this->old_post_id ) );
    4646    }
    47    
     47
    4848    public function deprecated_handler( $function, $message, $version ) {
    4949        $this->_deprecated_errors[] = array(
     
    6868        $this->assertEquals( 'test_author', get_the_author_meta( 'user_login' ) );
    6969        $this->assertEquals( 'test_author', get_the_author_meta( 'display_name' ) );
     70
    7071        $this->assertEquals( 'test_author', get_the_author_meta( 'description' ) );
    7172        $this->assertEquals( 'test_author', get_the_author_meta( 'user_description' ) );
     73        add_user_meta( $this->author_id, 'user_description', 'user description' );
     74        $this->assertEquals( 'user description', get_user_meta( $this->author_id, 'user_description', true ) );
     75        // user_description in meta is ignored. The content of description is returned instead.
     76        // See #20285
     77        $this->assertEquals( 'test_author', get_the_author_meta( 'user_description' ) );
     78        $this->assertEquals( 'test_author', get_the_author_meta( 'description' ) );
     79        update_user_meta( $this->author_id, 'user_description', '' );
     80        $this->assertEquals( '', get_user_meta( $this->author_id, 'user_description', true ) );
     81        $this->assertEquals( 'test_author', get_the_author_meta( 'user_description' ) );
     82        $this->assertEquals( 'test_author', get_the_author_meta( 'description' ) );
     83
    7284        $this->assertEquals( '', get_the_author_meta( 'does_not_exist' ) );
    7385       
Note: See TracChangeset for help on using the changeset viewer.