WordPress.org

Make WordPress Core

Changeset 654 in tests


Ignore:
Timestamp:
04/09/12 19:17:33 (2 years ago)
Author:
ryan
Message:

WP_User::exists() tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_user.php

    r618 r654  
    392392        $this->assertNull( $userdata ); 
    393393    } 
     394 
     395    function test_exists() { 
     396        $user_id = $this->_make_user('author'); 
     397        $user = new WP_User( $user_id ); 
     398 
     399        $this->assertTrue( $user->exists() ); 
     400 
     401        $user = new WP_User( 123456789 ); 
     402 
     403        $this->assertFalse( $user->exists() ); 
     404 
     405        $user = new WP_User( 0 ); 
     406 
     407        $this->assertFalse( $user->exists() ); 
     408    } 
     409 
    394410} 
    395411 
Note: See TracChangeset for help on using the changeset viewer.