@@ -147,7 +147,7 @@ public function test_order_tracking_when_expected_user_flow() {
147147 $ script_type = $ this ->get_type_attribute ();
148148
149149 $ expected_code = <<<EOF
150- <script $ script_type> $ cdata_start
150+ <script $ script_type> $ cdata_start
151151window._paq = window._paq || []; window._paq.push(["addEcommerceItem","10","a tiny hat",["Uncategorized"],12,2]);window._paq = window._paq || []; window._paq.push(["trackEcommerceCartUpdate","24.00"]);
152152$ cdata_end</script>
153153EOF ;
@@ -184,10 +184,10 @@ public function test_order_tracking_when_order_processed_before_order_received()
184184 $ script_type = $ this ->get_type_attribute ();
185185
186186 $ expected_code = <<<EOF
187- <script $ script_type> $ cdata_start
187+ <script $ script_type> $ cdata_start
188188window._paq = window._paq || []; window._paq.push(["addEcommerceItem","10","a tiny hat",["Uncategorized"],12,2]);window._paq = window._paq || []; window._paq.push(["trackEcommerceCartUpdate","24.00"]);
189189$ cdata_end</script>
190- <script $ script_type> $ cdata_start
190+ <script $ script_type> $ cdata_start
191191window._paq = window._paq || []; window._paq.push(["addEcommerceItem","10","a tiny hat",["Uncategorized"],12,2]);window._paq = window._paq || []; window._paq.push(["trackEcommerceOrder","11","24.00",24,"0","0",0]);
192192$ cdata_end</script>
193193EOF ;
@@ -441,15 +441,4 @@ private function set_visitor_id_cookie( $visitor_id ) {
441441 $ this ->test_instance ->setTracker ( $ this ->tracker );
442442 $ this ->assertEquals ( $ visitor_id , $ this ->test_instance ->getTracker ()->forcedVisitorId );
443443 }
444-
445- /**
446- * @return string
447- */
448- protected function get_type_attribute () {
449- $ type = '' ;
450- if ( function_exists ( 'wp_get_inline_script_tag ' ) && ! is_admin () && ! current_theme_supports ( 'html5 ' , 'script ' ) ) {
451- $ type = 'type="text/javascript" ' ;
452- }
453- return $ type ;
454- }
455444}
0 commit comments