WordPress.org

Make WordPress Core

Changeset 611 in tests


Ignore:
Timestamp:
04/05/2012 07:56:40 PM (6 years ago)
Author:
markjaquith
Message:

Also make our own author user for test_page_meta_caps()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_user_capabilities.php

    r609 r611  
    513513        // simple tests for some common meta capabilities
    514514
     515        // Make our author
     516        $author = new WP_User($this->_make_user('author'));     
     517
    515518        // make a page
    516         $this->_insert_quick_pages(1);
     519        $this->_insert_quick_pages(1, array( 'post_author' => $author->ID ) );
    517520        $page = end($this->post_ids);
    518521
    519522        // the author of the page
    520         $author = new WP_User($this->author->ID);
    521         $this->assertInternalType('object', $author->data, "Problem getting user " . $this->author->ID);
    522         $author->set_role('author');
     523        $this->assertInternalType('object', $author->data, "Problem getting user " . $author->ID);
    523524
    524525        // add some other users
Note: See TracChangeset for help on using the changeset viewer.