- Timestamp:
- 02/21/2020 01:05:39 PM (5 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
-
branches/3.8/tests/phpunit/tests/dependencies/scripts.php
r26370 r47338 85 85 $wp_scripts->base_url = $base_url_backup; 86 86 } 87 88 /**89 * @ticket 2222990 */91 function test_inline_should_not_output_script_tag_with_src() {92 wp_enqueue_script( 'baba-inline-0', 'inline' );93 $this->assertEquals( '', get_echo( 'wp_print_scripts' ) );94 }95 96 /**97 * @ticket 2222998 */99 function test_json_encode_should_not_encode_special_literal_values() {100 if ( ! class_exists( 'WP_JS_Literal' ) ) {101 $this->markTestSkipped( "WP_JS_Literal class doesn't exist" );102 }103 104 $literal = new WP_JS_Literal( 'baba()' );105 $this->assertEquals( '{"x":baba()}', WP_JS_Literal::json_encode( array( 'x' => $literal ), array( $literal ) ) );106 }107 108 /**109 * @ticket 22229110 */111 function test_json_encode_should_not_encode_special_literal_values_with_dependencies() {112 if ( ! class_exists( 'WP_JS_Literal' ) ) {113 $this->markTestSkipped( "WP_JS_Literal class doesn't exist" );114 }115 116 $literal = new WP_JS_Literal( 'baba()', array( 'dep0', 'dep1' ) );117 $this->assertEquals( '{"x":baba()}', WP_JS_Literal::json_encode( array( 'x' => $literal ), array( $literal ) ) );118 }119 87 }
Note: See TracChangeset
for help on using the changeset viewer.