| | 47 | * Test assorted handles to make sure we don't break how they output. |
| | 48 | */ |
| | 49 | public function test_awkward_handles_are_supported_consistently() { |
| | 50 | wp_enqueue_style( 'with some spaces', 'example.com', array(), null ); |
| | 51 | wp_enqueue_style( 'with-☃-snowman', 'example.com', array(), null ); |
| | 52 | wp_enqueue_style( 'with-trailing-space ', 'example.com', array(), null ); |
| | 53 | wp_enqueue_style( ' with-leading-space', 'example.com', array(), null ); |
| | 54 | wp_enqueue_style( 'an "ironic" title', 'example.com', array(), null ); |
| | 55 | |
| | 56 | $expected = "<link rel='stylesheet' id='with some spaces-css' href='http://example.com' type='text/css' media='all' />\n"; |
| | 57 | $expected .= "<link rel='stylesheet' id='with-☃-snowman-css' href='http://example.com' type='text/css' media='all' />\n"; |
| | 58 | $expected .= "<link rel='stylesheet' id='with-trailing-space -css' href='http://example.com' type='text/css' media='all' />\n"; |
| | 59 | $expected .= "<link rel='stylesheet' id=' with-leading-space-css' href='http://example.com' type='text/css' media='all' />\n"; |
| | 60 | $expected .= "<link rel='stylesheet' id='an \"ironic\" title-css' href='http://example.com' type='text/css' media='all' />\n"; |
| | 61 | |
| | 62 | $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); |
| | 63 | } |
| | 64 | |
| | 65 | /** |