Skip to content

Commit

Permalink
tests: Rollback quote change
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb committed Jan 19, 2025
1 parent f4db535 commit 0f4ea16
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/wpunit/AssetsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,15 @@ public function should_localize_data_correctly(): void {
->register();

$this->assertEquals( <<< SCRIPT
<script id='my-first-script-js-extra'>
<script id="my-first-script-js-extra">
var boomshakalakaProjectFirstScriptData = {"animal":"cat","color":"orange"};
</script>
SCRIPT,
apply_filters( 'script_loader_tag', '', 'my-first-script' )
);
$this->assertEquals( <<< SCRIPT
<script id='my-second-script-js-extra'>
<script id="my-second-script-js-extra">
var boomshakalakaProjectSecondScriptData = {"animal":"dog","color":"green"};
</script>
Expand All @@ -422,7 +422,7 @@ public function should_localize_data_correctly(): void {
);

$this->assertEquals( <<< SCRIPT
<script id='my-second-script-mod-js-extra'>
<script id="my-second-script-mod-js-extra">
var boomshakalakaProjectSecondScriptModData = {"animal":"horse"};
</script>
Expand Down Expand Up @@ -504,7 +504,7 @@ public function should_allow_localizing_data_in_normal_and_namespaced_form_for_s

$apply_filters = apply_filters( 'script_loader_tag', '', 'my-test-script' );
$this->assertEquals( <<< SCRIPT
<script id='my-test-script-js-extra'>
<script id="my-test-script-js-extra">
var boomshakalakaProjectTestScriptData = {"animal":"cat","color":"orange"};
</script>
<script id="my-test-script-ns-extra">
Expand Down Expand Up @@ -552,7 +552,7 @@ public function should_allow_localizing_data_using_a_closure(): void {

$apply_filters = apply_filters( 'script_loader_tag', '', 'my-script-with-closure-data' );
$this->assertEquals( <<< SCRIPT
<script id='my-script-with-closure-data-js-extra'>
<script id="my-script-with-closure-data-js-extra">
var scriptWithClosureData = {"animal":"cat","color":"orange"};
</script>
<script id="my-script-with-closure-data-ns-extra">
Expand Down Expand Up @@ -587,9 +587,9 @@ public function should_allow_setting_dependencies_with_an_array(): void {
ob_start();
do_action( 'test_action' );
$this->assertEquals( <<< SCRIPT
<script src='http://wordpress.test/wp-content/plugins/assets/tests/_data/js/base-script.js?ver=1.0.0' id='my-deps-base-script-js'></script>
<script src='http://wordpress.test/wp-content/plugins/assets/tests/_data/js/vendor-script.js?ver=1.0.0' id='my-deps-vendor-script-js'></script>
<script src='http://wordpress.test/wp-content/plugins/assets/tests/_data/js/dependent-script.js?ver=1.0.0' id='my-deps-dependent-script-js'></script>
<script src="http://wordpress.test/wp-content/plugins/assets/tests/_data/js/base-script.js?ver=1.0.0" id="my-deps-base-script-js"></script>
<script src="http://wordpress.test/wp-content/plugins/assets/tests/_data/js/vendor-script.js?ver=1.0.0" id="my-deps-vendor-script-js"></script>
<script src="http://wordpress.test/wp-content/plugins/assets/tests/_data/js/dependent-script.js?ver=1.0.0" id="my-deps-dependent-script-js"></script>
SCRIPT,
ob_get_clean()
Expand Down Expand Up @@ -625,9 +625,9 @@ public function should_allow_setting_dependencies_with_a_callable(): void {
ob_start();
do_action( 'test_action_2' );
$this->assertEquals( <<< SCRIPT
<script src='http://wordpress.test/wp-content/plugins/assets/tests/_data/js/base-script-2.js?ver=1.0.0' id='my-base-script-2-js'></script>
<script src='http://wordpress.test/wp-content/plugins/assets/tests/_data/js/vendor-script-2.js?ver=1.0.0' id='my-vendor-script-2-js'></script>
<script src='http://wordpress.test/wp-content/plugins/assets/tests/_data/js/dependent-script-2.js?ver=1.0.0' id='my-dependent-script-2-js'></script>
<script src="http://wordpress.test/wp-content/plugins/assets/tests/_data/js/base-script-2.js?ver=1.0.0" id="my-base-script-2-js"></script>
<script src="http://wordpress.test/wp-content/plugins/assets/tests/_data/js/vendor-script-2.js?ver=1.0.0" id="my-vendor-script-2-js"></script>
<script src="http://wordpress.test/wp-content/plugins/assets/tests/_data/js/dependent-script-2.js?ver=1.0.0" id="my-dependent-script-2-js"></script>
SCRIPT,
ob_get_clean()
Expand Down

0 comments on commit 0f4ea16

Please sign in to comment.