WordPress.org

Make WordPress Core

Changeset 1013 in tests


Ignore:
Timestamp:
09/10/2012 05:51:39 PM (6 years ago)
Author:
ryan
Message:

Makre sure all properties are set in the objects returned from get_blogs_of_user(). see #WP16225

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ms.php

    r1009 r1013  
    6969            $this->assertInternalType( 'int', $blog_id );
    7070
    71         $blogs_of_user = array_keys( get_blogs_of_user( $user1_id, $all = false ) );
     71        $blogs_of_user = array_keys( get_blogs_of_user( $user1_id, false ) );
    7272        sort( $blogs_of_user );
    7373        $this->assertEquals ( array_merge( array( 1 ), $blog_ids), $blogs_of_user );
     
    7575        $this->assertTrue( remove_user_from_blog( $user1_id, 1 ) );
    7676
    77         $blogs_of_user = array_keys( get_blogs_of_user( $user1_id, $all = false ) );
     77        $blogs_of_user = array_keys( get_blogs_of_user( $user1_id, false ) );
    7878        sort( $blogs_of_user );
    7979        $this->assertEquals ( $blog_ids, $blogs_of_user );
     80
     81        foreach ( get_blogs_of_user( $user1_id, false ) as $blog ) {
     82            $this->assertTrue( isset( $blog->userblog_id ) );
     83            $this->assertTrue( isset( $blog->blogname ) );
     84            $this->assertTrue( isset( $blog->domain ) );
     85            $this->assertTrue( isset( $blog->path ) );
     86            $this->assertTrue( isset( $blog->site_id ) );
     87            $this->assertTrue( isset( $blog->siteurl ) );
     88            $this->assertTrue( isset( $blog->archived ) );
     89            $this->assertTrue( isset( $blog->spam ) );
     90            $this->assertTrue( isset( $blog->deleted ) );
     91        }
    8092
    8193        // Non-existent users don't have blogs.
Note: See TracChangeset for help on using the changeset viewer.