diff --git tests/phpunit/tests/dependencies/scripts.php tests/phpunit/tests/dependencies/scripts.php
index 3f4e724..783cf00 100644
|
|
class Tests_Dependencies_Scripts extends WP_UnitTestCase { |
84 | 84 | // Cleanup |
85 | 85 | $wp_scripts->base_url = $base_url_backup; |
86 | 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Test Conditional Comments |
| 90 | * @ticket 10624 |
| 91 | */ |
| 92 | function test_wp_script_add_data() { |
| 93 | // Enqueue & add conditional comments |
| 94 | wp_enqueue_script( 'twentytwelve-html5', 'example.com', array(), '1.0' ); |
| 95 | wp_script_add_data( 'twentytwelve-html5', 'conditional', 'lt IE 9' ); |
| 96 | $expected = "<!--[if lt IE 9]>\n<script type='text/javascript' src='http://example.com?ver=1.0'></script>\n<![endif]-->\n"; |
| 97 | |
| 98 | // Go! |
| 99 | $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); |
| 100 | |
| 101 | // No scripts left to print |
| 102 | $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); |
| 103 | } |
87 | 104 | } |