From 5e30a927bc2d4027a660a3f7f34315a93bb06215 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 23 Mar 2023 22:36:19 +1100 Subject: tests: Make some PHPUnit data providers static Just methods where adding "static" to the declaration was enough, I didn't do anything with providers that used $this. Initially by search and replace. There were many mistakes which I found mostly by running the PHPStorm inspection which searches for $this usage in a static method. Later I used the PHPStorm "make static" action which avoids the more obvious mistakes. Bug: T332865 Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36 --- tests/phpunit/includes/api/query/ApiQueryBlockInfoTraitTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/phpunit/includes/api/query/ApiQueryBlockInfoTraitTest.php') diff --git a/tests/phpunit/includes/api/query/ApiQueryBlockInfoTraitTest.php b/tests/phpunit/includes/api/query/ApiQueryBlockInfoTraitTest.php index 52c489b4772b..dbe22c122f8b 100644 --- a/tests/phpunit/includes/api/query/ApiQueryBlockInfoTraitTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryBlockInfoTraitTest.php @@ -44,7 +44,7 @@ class ApiQueryBlockInfoTraitTest extends MediaWikiIntegrationTestCase { $this->assertEquals( $expect, $data ); } - public function provideAddBlockInfoToQuery() { + public static function provideAddBlockInfoToQuery() { $queryInfo = DatabaseBlock::getQueryInfo(); $db = wfGetDB( DB_REPLICA ); -- cgit v1.2.3