Make WordPress Core

Changeset 692 in tests


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

More author meta tests

Files:
2 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               
  • wp-testlib/base.php

    r686 r692  
    387387                        'pass2' => $pass,
    388388                        'email' => $email,
     389                        'description' => $user_login,
    389390                );
    390391
Note: See TracChangeset for help on using the changeset viewer.