7
7
8
8
class Test_Speculation_Rules_WP_Core_API extends WP_UnitTestCase {
9
9
10
+ /**
11
+ * @covers ::plsr_filter_speculation_rules_configuration
12
+ */
10
13
public function test_plsr_filter_speculation_rules_configuration_with_regular (): void {
11
14
$ this ->assertSame (
12
15
array (
@@ -22,6 +25,9 @@ public function test_plsr_filter_speculation_rules_configuration_with_regular():
22
25
);
23
26
}
24
27
28
+ /**
29
+ * @covers ::plsr_filter_speculation_rules_configuration
30
+ */
25
31
public function test_plsr_filter_speculation_rules_configuration_with_invalid (): void {
26
32
$ this ->assertSame (
27
33
array (
@@ -32,10 +38,16 @@ public function test_plsr_filter_speculation_rules_configuration_with_invalid():
32
38
);
33
39
}
34
40
41
+ /**
42
+ * @covers ::plsr_filter_speculation_rules_configuration
43
+ */
35
44
public function test_plsr_filter_speculation_rules_configuration_with_null (): void {
36
45
$ this ->assertNull ( plsr_filter_speculation_rules_configuration ( null ) );
37
46
}
38
47
48
+ /**
49
+ * @covers ::plsr_filter_speculation_rules_configuration
50
+ */
39
51
public function test_plsr_filter_speculation_rules_configuration_with_pretty_permalinks_filter (): void {
40
52
// Providing null while pretty permalinks are disabled should be respected.
41
53
$ this ->disable_pretty_permalinks ();
@@ -52,6 +64,9 @@ public function test_plsr_filter_speculation_rules_configuration_with_pretty_per
52
64
);
53
65
}
54
66
67
+ /**
68
+ * @covers ::plsr_filter_speculation_rules_exclude_paths
69
+ */
55
70
public function test_plsr_filter_speculation_rules_exclude_paths_with_regular (): void {
56
71
$ base_rules = array ( '/membership-areas/* ' );
57
72
@@ -71,6 +86,9 @@ static function ( $rules ) {
71
86
);
72
87
}
73
88
89
+ /**
90
+ * @covers ::plsr_filter_speculation_rules_exclude_paths
91
+ */
74
92
public function test_plsr_filter_speculation_rules_exclude_paths_with_invalid (): void {
75
93
$ this ->assertSame ( array ( '/personalized/* ' ), plsr_filter_speculation_rules_exclude_paths ( '/personalized/* ' , 'prefetch ' ) );
76
94
}
0 commit comments