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
$this->assertStringContainsString( 'This section allows you to control how URLs that your users navigate to are speculatively loaded to improve performance.', $output );
213
+
}
214
+
215
+
/**
216
+
* Data provider for testing plsr_render_settings_field.
217
+
*
218
+
* @return array<string, array<mixed>> Data for testing settings fields.
219
+
*/
220
+
publicfunctionsettingsFieldProvider(): array {
221
+
returnarray(
222
+
'mode' => array(
223
+
array(
224
+
'field' => 'mode',
225
+
'title' => 'Speculation Mode',
226
+
'description' => 'Prerendering will lead to faster load times than prefetching.',
227
+
),
228
+
array(
229
+
'mode' => 'prefetch',
230
+
'eagerness' => 'moderate',
231
+
),
232
+
'name="plsr_speculation_rules[mode]"',
233
+
'value="prefetch"',
234
+
'Prerendering will lead to faster load times than prefetching.',
235
+
),
236
+
'eagerness' => array(
237
+
array(
238
+
'field' => 'eagerness',
239
+
'title' => 'Eagerness',
240
+
'description' => 'The eagerness setting defines the heuristics based on which the loading is triggered.',
241
+
),
242
+
array(
243
+
'mode' => 'prefetch',
244
+
'eagerness' => 'moderate',
245
+
),
246
+
'name="plsr_speculation_rules[eagerness]"',
247
+
'value="moderate"',
248
+
'The eagerness setting defines the heuristics based on which the loading is triggered.',
249
+
),
250
+
);
251
+
}
252
+
253
+
/**
254
+
* Test rendering of settings fields using data provider.
255
+
*
256
+
* @dataProvider settingsFieldProvider
257
+
* @param array<mixed> $args Arguments for the settings field.
0 commit comments