upgrade phpunit: make data provider static

This commit is contained in:
2024-02-14 12:28:14 +01:00
parent d5115b3718
commit f251e6f100
57 changed files with 142 additions and 121 deletions

View File

@@ -107,7 +107,7 @@ class TempUrlOpenstackGeneratorTest extends TestCase
self::assertGreaterThanOrEqual(20, strlen($signedUrl->prefix));
}
public function dataProviderGenerate(): iterable
public static function dataProviderGenerate(): iterable
{
$now = \DateTimeImmutable::createFromFormat('U', '1702041743');
$expireDelay = 1800;
@@ -138,7 +138,7 @@ class TempUrlOpenstackGeneratorTest extends TestCase
}
}
public function dataProviderGeneratePost(): iterable
public static function dataProviderGeneratePost(): iterable
{
$now = \DateTimeImmutable::createFromFormat('U', '1702041743');
$expireDelay = 1800;

View File

@@ -68,7 +68,7 @@ class AsyncUploadExtensionTest extends KernelTestCase
self::assertEquals('url', $actual);
}
public function dataProviderStoredObject(): iterable
public static function dataProviderStoredObject(): iterable
{
yield [(new StoredObject())->setFilename('blabla')];

View File

@@ -69,7 +69,7 @@ class AccompanyingCourseDocumentGenericDocProviderTest extends KernelTestCase
self::assertIsInt($nb);
}
public function provideSearchArguments(): iterable
public static function provideSearchArguments(): iterable
{
yield [null, null, null];
yield [new \DateTimeImmutable('1 month ago'), null, null];

View File

@@ -73,7 +73,7 @@ class PersonDocumentGenericDocProviderTest extends KernelTestCase
self::assertIsInt($nb, 'Test that the query is syntactically correct');
}
public function provideDataBuildFetchQueryForPerson(): iterable
public static function provideDataBuildFetchQueryForPerson(): iterable
{
yield [null, null, null];
yield [new \DateTimeImmutable('1 year ago'), null, null];

View File

@@ -142,7 +142,7 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
yield [$period, new \DateTimeImmutable('2 years ago'), new \DateTimeImmutable('1 year ago'), 'test'];
}
public function provideDataBuildFetchQueryForPerson(): iterable
public static function provideDataBuildFetchQueryForPerson(): iterable
{
yield [null, null, null];
yield [new \DateTimeImmutable('1 year ago'), null, null];

View File

@@ -31,7 +31,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
*/
final class StoredObjectManagerTest extends TestCase
{
public function getDataProvider(): \Generator
public static function getDataProvider(): \Generator
{
/* HAPPY SCENARIO */