@@ -730,7 +730,7 @@ public function data_provider_test_get_common_lcp_element(): array {
730
730
$ xpath1 = '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::IMG]/*[1] ' ;
731
731
$ xpath2 = '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::IMG]/*[2] ' ;
732
732
733
- $ get_sample_url_metric = function ( int $ viewport_width , string $ lcp_element_xpath , bool $ is_lcp ): OD_URL_Metric {
733
+ $ get_sample_url_metric = function ( int $ viewport_width , string $ lcp_element_xpath , bool $ is_lcp = true ): OD_URL_Metric {
734
734
return $ this ->get_sample_url_metric (
735
735
array (
736
736
'viewport_width ' => $ viewport_width ,
@@ -745,9 +745,9 @@ public function data_provider_test_get_common_lcp_element(): array {
745
745
return array (
746
746
'all_groups_have_common_lcp ' => array (
747
747
'url_metrics ' => array (
748
- $ get_sample_url_metric ( 400 , $ xpath1, true ),
749
- $ get_sample_url_metric ( 600 , $ xpath1, true ),
750
- $ get_sample_url_metric ( 1000 , $ xpath1, true ),
748
+ $ get_sample_url_metric ( 400 , $ xpath1 ),
749
+ $ get_sample_url_metric ( 600 , $ xpath1 ),
750
+ $ get_sample_url_metric ( 1000 , $ xpath1 ),
751
751
),
752
752
'expected ' => array (
753
753
'type ' => OD_Element::class,
@@ -760,22 +760,22 @@ public function data_provider_test_get_common_lcp_element(): array {
760
760
),
761
761
'empty_first_group ' => array (
762
762
'url_metrics ' => array (
763
- $ get_sample_url_metric ( 600 , $ xpath1, true ),
764
- $ get_sample_url_metric ( 1000 , $ xpath1, true ),
763
+ $ get_sample_url_metric ( 600 , $ xpath1 ),
764
+ $ get_sample_url_metric ( 1000 , $ xpath1 ),
765
765
),
766
766
'expected ' => null ,
767
767
),
768
768
'empty_last_group ' => array (
769
769
'url_metrics ' => array (
770
- $ get_sample_url_metric ( 400 , $ xpath1, true ),
771
- $ get_sample_url_metric ( 600 , $ xpath1, true ),
770
+ $ get_sample_url_metric ( 400 , $ xpath1 ),
771
+ $ get_sample_url_metric ( 600 , $ xpath1 ),
772
772
),
773
773
'expected ' => null ,
774
774
),
775
775
'first_and_last_common_lcp_others_empty ' => array (
776
776
'url_metrics ' => array (
777
- $ get_sample_url_metric ( 400 , $ xpath1, true ),
778
- $ get_sample_url_metric ( 1000 , $ xpath1, true ),
777
+ $ get_sample_url_metric ( 400 , $ xpath1 ),
778
+ $ get_sample_url_metric ( 1000 , $ xpath1 ),
779
779
),
780
780
'expected ' => array (
781
781
'type ' => OD_Element::class,
@@ -784,17 +784,17 @@ public function data_provider_test_get_common_lcp_element(): array {
784
784
),
785
785
'intermediate_groups_conflict ' => array (
786
786
'url_metrics ' => array (
787
- $ get_sample_url_metric ( 400 , $ xpath1, true ),
788
- $ get_sample_url_metric ( 600 , $ xpath2, true ),
789
- $ get_sample_url_metric ( 1000 , $ xpath1, true ),
787
+ $ get_sample_url_metric ( 400 , $ xpath1 ),
788
+ $ get_sample_url_metric ( 600 , $ xpath2 ),
789
+ $ get_sample_url_metric ( 1000 , $ xpath1 ),
790
790
),
791
791
'expected ' => null ,
792
792
),
793
793
'first_and_last_lcp_mismatch ' => array (
794
794
'url_metrics ' => array (
795
- $ get_sample_url_metric ( 400 , $ xpath1, true ),
796
- $ get_sample_url_metric ( 600 , $ xpath1, true ),
797
- $ get_sample_url_metric ( 1000 , $ xpath2, true ),
795
+ $ get_sample_url_metric ( 400 , $ xpath1 ),
796
+ $ get_sample_url_metric ( 600 , $ xpath1 ),
797
+ $ get_sample_url_metric ( 1000 , $ xpath2 ),
798
798
),
799
799
'expected ' => null ,
800
800
),
0 commit comments