You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it is not possible to mock wp_print_inline_script_tag making it challenging to test various scenarios, like the scripts inserted for the gtag events. See this case:
If we add wp_print_inline_script_tag within the WP Proxy class we will be able to mock the method and therefore to test different scenarios easily, similar what is done here:
jorgemd24
changed the title
Add wp_print_inline_script_tag within the WP Proxy class to facilitate testing the printing scripts
Add wp_print_inline_script_tag within the WP Proxy class to facilitate testing the inline scripts
Dec 15, 2023
Describe the bug:
This a follow-up of #2184
Currently, it is not possible to mock
wp_print_inline_script_tag
making it challenging to test various scenarios, like the scripts inserted for the gtag events. See this case:google-listings-and-ads/src/Google/GlobalSiteTag.php
Lines 285 to 297 in d65b577
If we add
wp_print_inline_script_tag
within the WP Proxy class we will be able to mock the method and therefore to test different scenarios easily, similar what is done here:google-listings-and-ads/tests/Unit/API/Google/AdsAssetTest.php
Lines 132 to 143 in d65b577
Expected behavior:
To be able to mock
wp_print_inline_script_tag easily
Actual behavior:
Difficult to mock
wp_print_inline_script_tag
Additional details:
The text was updated successfully, but these errors were encountered: