@@ -92,8 +92,9 @@ static function ( array $properties ) use ( $property_name ): array {
92
92
* @dataProvider data_provider_to_test_rest_request_good_params
93
93
*
94
94
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
95
- * @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
96
95
* @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
96
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
97
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
97
98
* @covers OD_Strict_URL_Metric::set_additional_properties_to_false
98
99
* @covers OD_URL_Metric_Store_Request_Context::__construct
99
100
* @covers OD_URL_Metric_Store_Request_Context::__get
@@ -181,6 +182,8 @@ function ( OD_URL_Metric_Store_Request_Context $context ) use ( &$stored_context
181
182
* @dataProvider data_provider_to_test_rest_request_good_params
182
183
*
183
184
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
185
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
186
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
184
187
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
185
188
* @covers OD_Strict_URL_Metric::set_additional_properties_to_false
186
189
*/
@@ -492,8 +495,9 @@ public function data_provider_invalid_params(): array {
492
495
* Test bad params.
493
496
*
494
497
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
495
- * @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
496
498
* @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
499
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
500
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
497
501
* @covers OD_Strict_URL_Metric::set_additional_properties_to_false
498
502
*
499
503
* @dataProvider data_provider_invalid_params
@@ -514,6 +518,8 @@ public function test_rest_request_bad_params( array $params, int $expected_statu
514
518
* Test sending data when no Origin request header is sent.
515
519
*
516
520
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
521
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
522
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
517
523
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
518
524
* @covers OD_REST_URL_Metrics_Store_Endpoint::is_allowed_http_origin
519
525
*/
@@ -530,6 +536,8 @@ public function test_rest_request_without_origin(): void {
530
536
* Test sending data when a cross-domain Origin request header is sent.
531
537
*
532
538
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
539
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
540
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
533
541
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
534
542
* @covers OD_REST_URL_Metrics_Store_Endpoint::is_allowed_http_origin
535
543
*/
@@ -547,6 +555,8 @@ public function test_rest_request_cross_origin(): void {
547
555
* Test REST API request when 'home_url' is filtered.
548
556
*
549
557
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
558
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
559
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
550
560
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
551
561
* @covers OD_REST_URL_Metrics_Store_Endpoint::is_allowed_http_origin
552
562
*/
@@ -566,6 +576,8 @@ static function ( string $url ): string {
566
576
* Test not sending JSON data.
567
577
*
568
578
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
579
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
580
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
569
581
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
570
582
*/
571
583
public function test_rest_request_not_json_data (): void {
@@ -582,6 +594,8 @@ public function test_rest_request_not_json_data(): void {
582
594
* Test not sending JSON Content-Type.
583
595
*
584
596
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
597
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
598
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
585
599
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
586
600
*/
587
601
public function test_rest_request_not_json_content_type (): void {
@@ -598,6 +612,8 @@ public function test_rest_request_not_json_content_type(): void {
598
612
* Test empty array JSON body.
599
613
*
600
614
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
615
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
616
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
601
617
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
602
618
*/
603
619
public function test_rest_request_empty_array_json_body (): void {
@@ -614,6 +630,8 @@ public function test_rest_request_empty_array_json_body(): void {
614
630
* Test non-array JSON body.
615
631
*
616
632
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
633
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
634
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
617
635
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
618
636
*/
619
637
public function test_rest_request_non_array_json_body (): void {
@@ -631,8 +649,9 @@ public function test_rest_request_non_array_json_body(): void {
631
649
* Test invalid compressed JSON body.
632
650
*
633
651
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
634
- * @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
635
652
* @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
653
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
654
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
636
655
*/
637
656
public function test_rest_request_invalid_compressed_json_body (): void {
638
657
$ request = $ this ->create_request ( $ this ->get_valid_params () );
@@ -647,6 +666,8 @@ public function test_rest_request_invalid_compressed_json_body(): void {
647
666
* Test timestamp ignored.
648
667
*
649
668
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
669
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
670
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
650
671
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
651
672
*/
652
673
public function test_rest_request_timestamp_ignored (): void {
@@ -680,6 +701,8 @@ public function test_rest_request_timestamp_ignored(): void {
680
701
* Test REST API request when metric storage is locked.
681
702
*
682
703
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
704
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
705
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
683
706
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
684
707
*/
685
708
public function test_rest_request_locked (): void {
@@ -696,6 +719,8 @@ public function test_rest_request_locked(): void {
696
719
* Test sending viewport data that isn't needed for any breakpoint.
697
720
*
698
721
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
722
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
723
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
699
724
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
700
725
*/
701
726
public function test_rest_request_breakpoint_not_needed_for_any_breakpoint (): void {
@@ -728,6 +753,8 @@ public function test_rest_request_breakpoint_not_needed_for_any_breakpoint(): vo
728
753
* Test sending viewport data that isn't needed for a specific breakpoint.
729
754
*
730
755
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
756
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
757
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
731
758
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
732
759
*/
733
760
public function test_rest_request_breakpoint_not_needed_for_specific_breakpoint (): void {
@@ -752,6 +779,8 @@ public function test_rest_request_breakpoint_not_needed_for_specific_breakpoint(
752
779
* Test fully populating the wider viewport group and then adding one more.
753
780
*
754
781
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
782
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
783
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
755
784
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
756
785
*/
757
786
public function test_rest_request_over_populate_wider_viewport_group (): void {
@@ -808,6 +837,8 @@ static function ( OD_URL_Metric_Group $group ) {
808
837
* Test fully populating the narrower viewport group and then adding one more.
809
838
*
810
839
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
840
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
841
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
811
842
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
812
843
*/
813
844
public function test_rest_request_over_populate_narrower_viewport_group (): void {
@@ -862,6 +893,8 @@ public function test_od_decompress_rest_request_body_modifies_request(): void {
862
893
* @dataProvider data_provider_maximum_url_metrics_size_filter
863
894
*
864
895
* @covers OD_REST_URL_Metrics_Store_Endpoint::get_registration_args
896
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::decompress_rest_request_body
897
+ * @covers OD_REST_URL_Metrics_Store_Endpoint::store_permissions_check
865
898
* @covers OD_REST_URL_Metrics_Store_Endpoint::handle_rest_request
866
899
* @covers ::od_get_maximum_url_metric_size
867
900
*
0 commit comments