WordPress.org

Make WordPress Core

Ticket #15458: 15458.testcase-get_blogs_of_user.patch

File 15458.testcase-get_blogs_of_user.patch, 956 bytes (added by SergeyBiryukov, 7 years ago)
  • wp-testcase/test_ms.php

     
    9393                        $blog_ids[] = $blog_id;
    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 )
    103107                        wpmu_delete_blog( $blog_id );