Skip to content

Commit 8a55d2f

Browse files
Make data provider methods static.
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
1 parent a0d4dda commit 8a55d2f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

tests/phpunit/tests/speculative-loading/wpGetSpeculationRules.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function test_wp_get_speculation_rules_with_prerender( string $eagerness
9191
}
9292
}
9393

94-
public function data_eagerness(): array {
94+
public static function data_eagerness(): array {
9595
return array(
9696
array( 'conservative' ),
9797
array( 'moderate' ),

tests/phpunit/tests/speculative-loading/wpGetSpeculationRulesConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function () use ( $filter_value ) {
8989
$this->assertSame( $expected, wp_get_speculation_rules_configuration() );
9090
}
9191

92-
public function data_wp_get_speculation_rules_configuration_filter(): array {
92+
public static function data_wp_get_speculation_rules_configuration_filter(): array {
9393
return array(
9494
'conservative prefetch' => array(
9595
array(

tests/phpunit/tests/speculative-loading/wpIsValidSpeculationRulesEagerness.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function test_wp_is_valid_speculation_rules_eagerness( $eagerness, $expec
2626
}
2727
}
2828

29-
public function data_is_valid_speculation_rules_eagerness(): array {
29+
public static function data_is_valid_speculation_rules_eagerness(): array {
3030
return array(
3131
'conservative' => array( 'conservative', true ),
3232
'moderate' => array( 'moderate', true ),

tests/phpunit/tests/speculative-loading/wpIsValidSpeculationRulesMode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function test_wp_is_valid_speculation_rules_mode( $mode, $expected ) {
2626
}
2727
}
2828

29-
public function data_is_valid_speculation_rules_mode(): array {
29+
public static function data_is_valid_speculation_rules_mode(): array {
3030
return array(
3131
'prefetch' => array( 'prefetch', true ),
3232
'prerender' => array( 'prerender', true ),

tests/phpunit/tests/speculative-loading/wpUrlPatternPrefixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function test_prefix_path_pattern( string $base_path, string $path_patter
2727
);
2828
}
2929

30-
public function data_prefix_path_pattern(): array {
30+
public static function data_prefix_path_pattern(): array {
3131
return array(
3232
array( '/', '/my-page/', '/my-page/' ),
3333
array( '/', 'my-page/', '/my-page/' ),
@@ -81,7 +81,7 @@ static function () use ( $unescaped ) {
8181
$this->assertSame( $expected, $contexts[ $context ] );
8282
}
8383

84-
public function data_default_contexts_with_subdirectories(): array {
84+
public static function data_default_contexts_with_subdirectories(): array {
8585
return array(
8686
array( 'home', 'https://example.com/subdir/', '/subdir/' ),
8787
array( 'site', 'https://example.com/subdir/wp/', '/subdir/wp/' ),

0 commit comments

Comments
 (0)