Changeset 31031 for trunk/tests/phpunit/tests/dependencies/styles.php
- Timestamp:
- 01/03/2015 04:09:12 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/dependencies/styles.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/styles.php
r29967 r31031 97 97 $style .= "\tbackground: red;\n"; 98 98 $style .= "}"; 99 99 100 100 $expected = "<link rel='stylesheet' id='handle-css' href='http://example.com?ver=1' type='text/css' media='all' />\n"; 101 101 $expected .= "<style id='handle-inline-css' type='text/css'>\n"; … … 148 148 $style1 .= "\tbackground: red;\n"; 149 149 $style1 .= "}"; 150 150 151 151 $style2 = ".thing2 {\n"; 152 152 $style2 .= "\tbackground: blue;\n"; … … 207 207 } 208 208 209 /** 210 * Test to make sure that inline styles attached to conditional 211 * stylesheets are also conditional. 212 */ 213 public function test_conditional_inline_styles_are_also_conditional() { 214 $expected = <<<CSS 215 <!--[if IE]> 216 <link rel='stylesheet' id='handle-css' href='http://example.com?ver=1' type='text/css' media='all' /> 217 <style id='handle-inline-css' type='text/css'> 218 a { color: blue; } 219 </style> 220 <![endif]--> 221 222 CSS; 223 wp_enqueue_style( 'handle', 'http://example.com', array(), 1 ); 224 wp_style_add_data( 'handle', 'conditional', 'IE' ); 225 wp_add_inline_style( 'handle', 'a { color: blue; }' ); 226 227 $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); 228 } 229 209 230 }
Note: See TracChangeset
for help on using the changeset viewer.