diff --git a/phpunit/functional/CommonDBTMTest.php b/phpunit/functional/CommonDBTMTest.php index 6c153ae1fb0..fa2f8cb9dd8 100644 --- a/phpunit/functional/CommonDBTMTest.php +++ b/phpunit/functional/CommonDBTMTest.php @@ -203,7 +203,7 @@ public function testGetEmpty() * * @return array */ - protected function getTableProvider() + public static function getTableProvider() { return [ [\DBConnection::class, ''], // "static protected $notable = true;" case @@ -935,7 +935,6 @@ public function testUpdate() $this->assertSame('renamed', $computer->fields['name']); } - public function testTimezones() { global $DB; @@ -1001,7 +1000,7 @@ public function testCircularRelation() $this->assertFalse(\Project::checkCircularRelation($project_id_4, $project_id_3)); } - protected function relationConfigProvider() + public static function relationConfigProvider() { return [ [ diff --git a/phpunit/functional/ConfigTest.php b/phpunit/functional/ConfigTest.php index cbaf18f4c1f..0b661896f53 100644 --- a/phpunit/functional/ConfigTest.php +++ b/phpunit/functional/ConfigTest.php @@ -790,7 +790,7 @@ public function testPasswordExpirationDelayUpdate() ); } - protected function logConfigChangeProvider() + public static function logConfigChangeProvider() { global $PLUGIN_HOOKS; diff --git a/phpunit/functional/HtmlTest.php b/phpunit/functional/HtmlTest.php index 7dbc5910e43..e1f7150ef5f 100644 --- a/phpunit/functional/HtmlTest.php +++ b/phpunit/functional/HtmlTest.php @@ -946,7 +946,7 @@ public function testGetScssFileHash() } - protected function testGetGenericDateTimeSearchItemsProvider(): array + public static function testGetGenericDateTimeSearchItemsProvider(): array { return [ [ diff --git a/phpunit/functional/Log.php b/phpunit/functional/Log.php index 1dff0b27bef..a6fe07aab12 100644 --- a/phpunit/functional/Log.php +++ b/phpunit/functional/Log.php @@ -743,7 +743,7 @@ public function testConvertFiltersValuesToSqlCriteria($filters_values, $expected $this->assertSame($expected_result, \Log::convertFiltersValuesToSqlCriteria($filters_values)); } - protected function userNameFormattingProvider() + public static function userNameFormattingProvider() { return [ [TU_USER, TU_PASS, TU_USER], diff --git a/phpunit/functional/ToolboxTest.php b/phpunit/functional/ToolboxTest.php index cfa9308ad7b..45688626e8f 100644 --- a/phpunit/functional/ToolboxTest.php +++ b/phpunit/functional/ToolboxTest.php @@ -543,7 +543,7 @@ public function testGetPictureUrl($path, $url) /** * Data provider for self::testConvertTagToImage(). */ - protected function convertTagToImageProvider() + public static function convertTagToImageProvider() { $data = []; @@ -636,7 +636,7 @@ public function testConvertTagToImage($item, $expected_url) /** * Data provider for self::testBaseUrlInConvertTagToImage(). */ - protected function convertTagToImageBaseUrlProvider() + public static function convertTagToImageBaseUrlProvider() { $item = new \Ticket(); $item->fields['id'] = mt_rand(1, 50); @@ -894,7 +894,7 @@ public function testConvertTagToImageWithDuplicatedInlinedImg() ); } - protected function shortenNumbers() + public static function shortenNumbers() { return [ [ @@ -1141,7 +1141,7 @@ public function testFutureDeprecated() } - public function hasTraitProvider() + public static function hasTraitProvider() { return [ [\Computer::class, Clonable::class, true], @@ -1196,7 +1196,7 @@ public function testGetDocumentsFromTag() $this->AssertCount(1, $output); } - public function appendParametersProvider() + public static function appendParametersProvider() { return [ [ @@ -1258,7 +1258,7 @@ public function testAppendParameters(array $params, string $separator, string $e * * @return Generator */ - protected function testIsFloatProvider(): Generator + public static function testIsFloatProvider(): Generator { yield [ 'value' => null, @@ -1347,7 +1347,7 @@ public function testIsFloat($value, bool $expected, ?string $warning = null): vo * * @return Generator */ - protected function testgetDecimalNumbersProvider(): Generator + public static function testgetDecimalNumbersProvider(): Generator { yield [ 'value' => "1", @@ -1431,7 +1431,7 @@ public function testGetDecimalNumbers($value, int $decimals, ?string $warning = * * @return Generator */ - protected function testGetMioSizeFromStringProvider(): Generator + public static function testGetMioSizeFromStringProvider(): Generator { yield [ 'size' => "1024", @@ -1505,7 +1505,7 @@ public function testGetMioSizeFromString(string $size, $expected): void $this->assertEquals($expected, $result); } - protected function safeUrlProvider(): iterable + public static function safeUrlProvider(): iterable { // Invalid URLs are refused yield [