Make WordPress Core

Changeset 40563


Ignore:
Timestamp:
05/01/2017 04:18:19 PM (9 years ago)
Author:
johnbillion
Message:

Users: Add two missing special cases to the capability tests for non-logged-in users.

Also updates a expectedIncorrectUsage notation.

See #37405

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/capabilities.php

    r40543 r40563  
    15651565        /**
    15661566         * @ticket 16956
     1567         * @expectedIncorrectUsage map_meta_cap
    15671568         */
    15681569        function test_require_edit_others_posts_if_post_type_doesnt_exist() {
    … …  
    15741575                $editor_id = self::$users['editor']->ID;
    15751576
    1576                 $this->setExpectedIncorrectUsage( 'map_meta_cap' );
    15771577                foreach ( array( 'delete_post', 'edit_post', 'read_post', 'publish_post' ) as $cap ) {
    15781578                        wp_set_current_user( $subscriber_id );
    … …  
    16411641                        $this->assertFalse( current_user_can( $cap ), "Non-logged-in user should not have the {$cap} capability" );
    16421642                }
     1643
     1644                // Special cases for link manager and unfiltered uploads:
     1645                $this->assertFalse( current_user_can( 'manage_links' ), "Non-logged-in user should not have the manage_links capability" );
     1646                $this->assertFalse( current_user_can( 'unfiltered_upload' ), "Non-logged-in user should not have the unfiltered_upload capability" );
    16431647
    16441648                $this->assertFalse( current_user_can( 'start_a_fire' ), "Non-logged-in user should not have a custom capability" );
Note: See TracChangeset for help on using the changeset viewer.