WordPress.org

Make WordPress Core

Changeset 793 in tests


Ignore:
Timestamp:
06/30/2012 07:21:43 PM (6 years ago)
Author:
nacin
Message:

Port test_includes_capabilities.php to the new test runner. fixes #67.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-testcase/test_includes_capabilities.php

    r745 r793  
    11<?php
    22
    3 class TestMapMetaCap extends WPTestCase {
     3/**
     4 * @group user
     5 * @group capabilities
     6 */
     7class TestMapMetaCap extends WP_UnitTestCase {
    48    var $super_admins = null;
    59
     
    913        $this->user_ids = array();
    1014
    11         $this->user_id = $this->_make_user( 'administrator' );
    12         $this->author_id = $this->_make_user( 'administrator' );
     15        $this->user_id   = $this->factory->user->create( array( 'role' => 'administrator' ) );
     16        $this->author_id = $this->factory->user->create( array( 'role' => 'administrator' ) );
    1317
    1418        if ( isset( $GLOBALS['super_admins'] ) )
     
    3034    function tearDown() {
    3135        parent::tearDown();
    32         wp_delete_post( $this->post_id, true );
    3336
    3437        $GLOBALS['super_admins'] = $this->super_admins;
    35 
    36         $this->_destroy_users();
     38        unset( $GLOBALS['wp_post_types'][ $this->post_type ] );
    3739    }
    3840
Note: See TracChangeset for help on using the changeset viewer.