Make WordPress Core


Ignore:
Timestamp:
11/22/2014 03:36:00 PM (10 years ago)
Author:
boonebgorges
Message:

Remove failing tests related to WP_User::__unset().

These tests have been added as a patch to their original ticket, #20043.

Props MikeHansenMe.
See #30284.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user.php

    r30430 r30513  
    146146    }
    147147
    148     /**
    149      * Test the magic __unset method
    150      *
    151      * @ticket 20043
    152      */
    153     public function test_user_unset() {
    154         // New user
    155         $user_id = $this->factory->user->create( array( 'role' => 'author' ) );
    156         $user = new WP_User( $user_id );
    157 
    158         // Test custom fields
    159         $user->customField = 123;
    160         $this->assertEquals( $user->customField, 123 );
    161         unset( $user->customField );
    162         $this->assertFalse( isset( $user->customField ) );
    163         return $user;
    164     }
    165 
    166     /**
    167      * @depends test_user_unset
    168      * @expectedDeprecated WP_User->id
    169      * @ticket 20043
    170      */
    171     function test_user_unset_lowercase_id( $user ) {
    172         // Test 'id' (lowercase)
    173         unset( $user->id );
    174         return $user;
    175     }
    176 
    177     /**
    178      * @depends test_user_unset_lowercase_id
    179      * @ticket 20043
    180      */
    181     function test_user_unset_uppercase_id( $user ) {
    182         // Test 'ID'
    183         $this->assertNotEmpty( $user->ID );
    184         unset( $user->ID );
    185         $this->assertEmpty( $user->ID );
    186     }
    187 
    188148    // Test meta property magic functions for property get/set/isset.
    189149    function test_user_meta_properties() {
Note: See TracChangeset for help on using the changeset viewer.