Changeset 745 in tests
- Timestamp:
- 06/27/2012 08:12:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-testcase/test_includes_capabilities.php
r730 r745 203 203 } 204 204 205 function test_unfiltered_html_cap() { 206 if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) 207 $this->markTestSkipped( 'DISALLOW_UNFILTERED_HTML is defined.' ); 208 if ( is_multisite() ) { 209 $this->assertEquals( array( 'do_not_allow' ), map_meta_cap( 'unfiltered_html', 0 ) ); 210 $this->assertEquals( array( 'unfiltered_html' ), map_meta_cap( 'unfiltered_html', $this->user_id ) ); 211 } else { 212 $this->assertEquals( array( 'unfiltered_html' ), map_meta_cap( 'unfiltered_html', $this->user_id ) ); 213 } 214 } 215 205 216 function test_file_edit_caps_not_reliant_on_unfiltered_html_constant() { 206 217 $this->knownWPBug(20488); 207 define( 'DISALLOW_UNFILTERED_HTML', true );208 218 if ( defined( 'DISALLOW_FILE_MODS' ) || defined( 'DISALLOW_FILE_EDIT' ) ) 209 219 $this->markTestSkipped('DISALLOW_FILE_MODS or DISALLOW_FILE_EDIT is defined.'); 220 221 if ( defined( 'DISALLOW_UNFILTERED_HTML' ) ) { 222 if ( ! DISALLOW_UNFILTERED_HTML ) 223 $this->markTestSkipped( 'DISALLOW_UNFILTERED_HTML is defined.' ); 224 } else { 225 define( 'DISALLOW_UNFILTERED_HTML', true ); 226 } 227 210 228 $this->assertEquals( array( 'update_core' ), map_meta_cap( 'update_core', $this->user_id ) ); 211 229 $this->assertEquals( array( 'edit_plugins' ), map_meta_cap( 'edit_plugins', $this->user_id ) );
Note: See TracChangeset
for help on using the changeset viewer.