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
Copy file name to clipboardExpand all lines: plugins/optimization-detective/tests/test-class-od-url-metrics-group-collection.php
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -22,79 +22,79 @@ public function data_provider_test_construction(): array {
22
22
$current_etag = md5( '' );
23
23
24
24
returnarray(
25
-
'no_breakpoints_ok'=> array(
25
+
'no_breakpoints_ok' => array(
26
26
'url_metrics' => array(),
27
27
'current_etag' => $current_etag,
28
28
'breakpoints' => array(),
29
29
'sample_size' => 3,
30
30
'freshness_ttl' => HOUR_IN_SECONDS,
31
31
'exception' => '',
32
32
),
33
-
'negative_breakpoint_bad'=> array(
33
+
'negative_breakpoint_bad' => array(
34
34
'url_metrics' => array(),
35
35
'current_etag' => $current_etag,
36
36
'breakpoints' => array( -1 ),
37
37
'sample_size' => 3,
38
38
'freshness_ttl' => HOUR_IN_SECONDS,
39
39
'exception' => InvalidArgumentException::class,
40
40
),
41
-
'zero_breakpoint_bad'=> array(
41
+
'zero_breakpoint_bad' => array(
42
42
'url_metrics' => array(),
43
43
'current_etag' => $current_etag,
44
44
'breakpoints' => array( 0 ),
45
45
'sample_size' => 3,
46
46
'freshness_ttl' => HOUR_IN_SECONDS,
47
47
'exception' => InvalidArgumentException::class,
48
48
),
49
-
'string_breakpoint_bad'=> array(
49
+
'string_breakpoint_bad' => array(
50
50
'url_metrics' => array(),
51
51
'current_etag' => $current_etag,
52
52
'breakpoints' => array( 'narrow' ),
53
53
'sample_size' => 3,
54
54
'freshness_ttl' => HOUR_IN_SECONDS,
55
55
'exception' => InvalidArgumentException::class,
56
56
),
57
-
'negative_sample_size_bad'=> array(
57
+
'negative_sample_size_bad' => array(
58
58
'url_metrics' => array(),
59
59
'current_etag' => $current_etag,
60
60
'breakpoints' => array( 400 ),
61
61
'sample_size' => -3,
62
62
'freshness_ttl' => HOUR_IN_SECONDS,
63
63
'exception' => InvalidArgumentException::class,
64
64
),
65
-
'negative_freshness_tll_bad' => array(
65
+
'negative_freshness_ttl_ok' => array(
66
66
'url_metrics' => array(),
67
67
'current_etag' => $current_etag,
68
68
'breakpoints' => array( 400 ),
69
69
'sample_size' => 3,
70
70
'freshness_ttl' => -HOUR_IN_SECONDS,
71
-
'exception' => InvalidArgumentException::class,
71
+
'exception' => '',
72
72
),
73
-
'invalid_current_etag_bad'=> array(
73
+
'invalid_current_etag_bad' => array(
74
74
'url_metrics' => array(),
75
75
'current_etag' => 'invalid_etag',
76
76
'breakpoints' => array( 400 ),
77
77
'sample_size' => 3,
78
78
'freshness_ttl' => HOUR_IN_SECONDS,
79
79
'exception' => InvalidArgumentException::class,
80
80
),
81
-
'invalid_current_etag_bad2'=> array(
81
+
'invalid_current_etag_bad2' => array(
82
82
'url_metrics' => array(),
83
83
'current_etag' => md5( '' ) . PHP_EOL, // Note that /^[a-f0-9]{32}$/ would erroneously validate this. So the \z is required instead in /^[a-f0-9]{32}\z/.
0 commit comments