Make WordPress Core


Ignore:
Timestamp:
09/12/2013 06:41:36 AM (12 years ago)
Author:
wonderboymusic
Message:
  • sort() returns a boolean, not a sorted set. Move the calls out of the assertions and fix the test methods.
  • Fix instances where Only variables should be passed by reference was being triggered by assigning array_keys() return value to a var

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/xmlrpc/wp/getProfile.php

    r25002 r25394  
    4040        $this->assertEquals( $editor_id, $result['user_id'] );
    4141
    42         $expected_fields = array_merge( array( 'user_id' ), $fields );
    43         $this->assertEquals( sort( $expected_fields ), sort( array_keys( $result ) ) );
     42        $expected_fields = array( 'user_id', 'email', 'bio' );
     43        $keys = array_keys( $result );
     44        sort( $expected_fields );
     45        sort( $keys );
     46        $this->assertEqualSets( $expected_fields, $keys );
    4447    }
    4548}
Note: See TracChangeset for help on using the changeset viewer.