Changeset 26370 for trunk/tests/phpunit/tests/dependencies/scripts.php
- Timestamp:
- 11/25/2013 10:49:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/scripts.php
r25002 r26370 98 98 */ 99 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 100 104 $literal = new WP_JS_Literal( 'baba()' ); 101 105 $this->assertEquals( '{"x":baba()}', WP_JS_Literal::json_encode( array( 'x' => $literal ), array( $literal ) ) ); … … 106 110 */ 107 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 108 116 $literal = new WP_JS_Literal( 'baba()', array( 'dep0', 'dep1' ) ); 109 117 $this->assertEquals( '{"x":baba()}', WP_JS_Literal::json_encode( array( 'x' => $literal ), array( $literal ) ) );
Note: See TracChangeset
for help on using the changeset viewer.