Make WordPress Core


Ignore:
Timestamp:
04/15/2017 09:24:53 PM (7 years ago)
Author:
johnbillion
Message:

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

See #30284.

Merges [30513] to the 4.0 branch.

See #40463

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/tests/phpunit/tests/user.php

    r30431 r40455  
    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.