Changeset 1004 in tests for trunk/tests/theme/WPTheme.php
- Timestamp:
- 09/03/2012 11:42:29 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/theme/WPTheme.php
r904 r1004 94 94 } 95 95 96 /** 97 * @ticket 21749 98 */ 99 function test_wp_theme_uris_with_spaces() { 100 $theme = new WP_Theme( 'theme with spaces', $this->theme_root . '/subdir' ); 101 // Make sure subdir/ is considered part of the stylesheet, as we must avoid encoding /'s. 102 $this->assertEquals( 'subdir/theme with spaces', $theme->get_stylesheet() ); 103 // Check that in a URI path, we have raw url encoding (spaces become %20) 104 $this->assertEquals( $this->theme_root . '/subdir/theme%20with%20spaces', $theme->get_stylesheet_directory_uri() ); 105 $this->assertEquals( $this->theme_root . '/subdir/theme%20with%20spaces', $theme->get_template_directory_uri() ); 106 // Check that wp_customize_url() uses url encoding, as it is a query arg (spaces become +) 107 $this->assertEquals( admin_url( 'customize.php?theme=theme+with+spaces' ), wp_customize_url( 'theme with spaces' ) ); 108 } 109 96 110 }
Note: See TracChangeset
for help on using the changeset viewer.