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

@@ -42,7 +42,7 @@ final class CalendarControllerTest extends WebTestCase
self::ensureKernelShutdown();
}
public function provideAccompanyingPeriod(): iterable
public static function provideAccompanyingPeriod(): iterable
{
self::bootKernel();
$em = self::getContainer()->get(EntityManagerInterface::class);

View File

@@ -59,7 +59,7 @@ class MSUserAbsenceReaderTest extends TestCase
self::assertNull($absenceReader->isUserAbsent($user), 'when no user found, absence should be null');
}
public function provideDataTestUserAbsence(): iterable
public static function provideDataTestUserAbsence(): iterable
{
// contains data that was retrieved from microsoft graph api on 2023-07-06

View File

@@ -46,7 +46,7 @@ class MSUserAbsenceSyncTest extends TestCase
self::assertEquals($expectedAbsenceStart, $user->getAbsenceStart(), $message);
}
public function provideDataTestSyncUserAbsence(): iterable
public static function provideDataTestSyncUserAbsence(): iterable
{
yield [new User(), false, false, null, 'user present remains present'];
yield [new User(), true, true, new \DateTimeImmutable('2023-07-01T12:00:00'), 'user present becomes absent'];

View File

@@ -35,7 +35,7 @@ final class DefaultRangeGeneratorTest extends TestCase
* * Jeudi => envoi des rdv du samedi et dimanche
* * Vendredi => Envoi des rdv du lundi.
*/
public function generateData(): \Iterator
public static function generateData(): \Iterator
{
yield [
new \DateTimeImmutable('2022-06-13 10:45:00'),