From a8a391a836077ed93af5d0712c22d3abf3dc9c63 Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Fri, 23 Oct 2026 23:07:56 +0530 Subject: [PATCH] Tests: Make data providers in file.php static --- tests/phpunit/tests/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/file.php b/tests/phpunit/tests/file.php index 34189fa0fcad8..9c4147661d278 100644 --- a/tests/phpunit/tests/file.php +++ b/tests/phpunit/tests/file.php @@ -120,7 +120,7 @@ public function test_wp_tempnam( $filename ) { $this->assertNotEmpty( basename( basename( $file, '.tmp' ), '.zip' ) ); } - public function data_wp_tempnam_filenames() { + public static function data_wp_tempnam_filenames() { return array( array( '0.zip' ), array( '0.1.2.3.zip' ), @@ -155,7 +155,7 @@ public function test_wp_tempnam_should_limit_filename_length_to_252_characters( * * @return array[] */ - public function data_wp_tempnam_should_limit_filename_length_to_252_characters() { + public static function data_wp_tempnam_should_limit_filename_length_to_252_characters() { return array( 'the limit before adding characters for uniqueness' => array( 'filename' => str_pad( '', 241, 'filename' ) ), 'one more than the limit before adding characters for uniqueness' => array( 'filename' => str_pad( '', 242, 'filename' ) ),