- Timestamp:
- 10/26/2018 03:54:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/tests/phpunit/tests/dependencies/scripts.php
r43825 r43828 774 774 wp_register_script( 'wp-i18n', '/wp-includes/js/dist/wp-i18n.js', array(), null ); 775 775 wp_enqueue_script( 'test-example', '/wp-includes/js/script.js', array(), null ); 776 wp_set_script_translations( 'test-example', 'default', __DIR__ . '/../../data/languages/' );776 wp_set_script_translations( 'test-example', 'default', DIR_TESTDATA . '/languages/' ); 777 777 778 778 $expected = "<script type='text/javascript' src='/wp-includes/js/dist/wp-i18n.js'></script>"; 779 779 $expected .= "\n<script type='text/javascript'>\n(function( translations ){" . 780 780 "wp.i18n.setLocaleData( translations.locale_data, \"default\" );" . 781 "})(" . file_get_contents( __DIR__ . '/../../data/languages/default-en_US-813e104eb47e13dd4cc5af844c618754.json') . ");\n</script>\n";781 "})(" . file_get_contents( DIR_TESTDATA . '/languages/default-en_US-813e104eb47e13dd4cc5af844c618754.json') . ");\n</script>\n"; 782 782 $expected .= "<script type='text/javascript' src='/wp-includes/js/script.js'></script>\n"; 783 783
Note: See TracChangeset
for help on using the changeset viewer.