WordPress.org

Make WordPress Core

Ticket #20488: test.20488.diff

File test.20488.diff, 881 bytes (added by nacin, 2 years ago)
  • wp-testcase/test_includes_capabilities.php

     
    190190                        map_meta_cap( $post_type_object->cap->delete_post, $this->user_id, $this->post_id ) ); 
    191191        } 
    192192 
     193        function test_file_edit_caps_not_reliant_on_unfiltered_html_constant() { 
     194                $this->knownWPBug(20488); 
     195                define( 'DISALLOW_UNFILTERED_HTML', true ); 
     196                if ( defined( 'DISALLOW_FILE_MODS' ) || defined( 'DISALLOW_FILE_EDIT' ) ) 
     197                        $this->markTestSkipped('DISALLOW_FILE_MODS or DISALLOW_FILE_EDIT is defined.'); 
     198                $this->assertEquals( array( 'update_core' ), map_meta_cap( 'update_core', $this->user_id ) ); 
     199                $this->assertEquals( array( 'edit_plugins' ), map_meta_cap( 'edit_plugins', $this->user_id ) ); 
     200        } 
    193201} 
    194202 
    195203?>