WordPress.org

Make WordPress Core

Changeset 453 in tests


Ignore:
Timestamp:
10/10/11 19:27:55 (3 years ago)
Author:
ryan
Message:

Make get_blogs_of_user() test immune to sort order. Props SergeyBiryukov

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_ms.php

    r452 r453  
    9494        } 
    9595 
    96         $this->assertEquals ( array_merge( array( 1 ), $blog_ids), array_keys( get_blogs_of_user( $user1_id, $all = false ) ) ); 
     96        $blogs_of_user = array_keys( get_blogs_of_user( $user1_id, $all = false ) ); 
     97        sort( $blogs_of_user ); 
     98        $this->assertEquals ( array_merge( array( 1 ), $blog_ids), $blogs_of_user ); 
    9799 
    98100        $this->assertTrue( remove_user_from_blog( $user1_id, 1 ) ); 
    99101 
    100         $this->assertEquals ( $blog_ids, array_keys( get_blogs_of_user( $user1_id, $all = false ) ) ); 
     102        $blogs_of_user = array_keys( get_blogs_of_user( $user1_id, $all = false ) ); 
     103        sort( $blogs_of_user ); 
     104        $this->assertEquals ( $blog_ids, $blogs_of_user ); 
    101105 
    102106        foreach ( $blog_ids as $blog_id )  
Note: See TracChangeset for help on using the changeset viewer.