Changeset 40525
- Timestamp:
- 04/22/2017 08:12:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/mapMetaCap.php
r39189 r40525 214 214 215 215 function test_unfiltered_html_cap() { 216 if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) 217 $this->markTestSkipped( 'DISALLOW_UNFILTERED_HTML is defined.' ); 216 if ( defined( 'DISALLOW_UNFILTERED_HTML' ) ) { 217 $this->assertFalse( DISALLOW_UNFILTERED_HTML ); 218 } 219 218 220 if ( is_multisite() ) { 219 221 $this->assertEquals( array( 'do_not_allow' ), map_meta_cap( 'unfiltered_html', 0 ) ); … … 228 230 */ 229 231 function test_file_edit_caps_not_reliant_on_unfiltered_html_constant() { 230 if ( defined( 'DISALLOW_FILE_MODS' ) || defined( 'DISALLOW_FILE_EDIT' ) ) 231 $this->markTestSkipped('DISALLOW_FILE_MODS or DISALLOW_FILE_EDIT is defined.'); 232 233 if ( defined( 'DISALLOW_UNFILTERED_HTML' ) ) { 234 if ( ! DISALLOW_UNFILTERED_HTML ) 235 $this->markTestSkipped( 'DISALLOW_UNFILTERED_HTML is defined.' ); 236 } else { 232 $this->assertFalse( defined( 'DISALLOW_FILE_MODS' ) ); 233 $this->assertFalse( defined( 'DISALLOW_FILE_EDIT' ) ); 234 235 if ( ! defined( 'DISALLOW_UNFILTERED_HTML' ) ) { 237 236 define( 'DISALLOW_UNFILTERED_HTML', true ); 238 237 } 239 238 239 $this->assertTrue( DISALLOW_UNFILTERED_HTML ); 240 240 $this->assertEquals( array( 'update_core' ), map_meta_cap( 'update_core', self::$user_id ) ); 241 241 $this->assertEquals( array( 'edit_plugins' ), map_meta_cap( 'edit_plugins', self::$user_id ) );
Note: See TracChangeset
for help on using the changeset viewer.