@@ -38,30 +38,29 @@ class CommemorationOfTheFallenTest extends SanMarinoBaseTestCase implements Holi
3838 /**
3939 * Tests the Commemoration of the Fallen.
4040 *
41- * @dataProvider CommemorationOfTheFallenDataProvider
42- *
43- * @param int $year the year for which the holiday needs to be tested
41+ * @param int $year the year for which the holiday defined in this test needs to be tested
4442 * @param \DateTime $expected the expected date
4543 */
46- public function testCommemorationOfTheFallen (int $ year , \DateTimeInterface $ expected ): void
44+ #[\PHPUnit \Framework \Attributes \DataProvider('HolidayDataProvider ' )]
45+ public function testHoliday (int $ year , \DateTimeInterface $ expected ): void
4746 {
4847 $ this ->assertHoliday (self ::REGION , self ::HOLIDAY , $ year , $ expected );
4948 }
5049
5150 /**
52- * Returns a list of random test dates used for assertion of the Commemoration of the Fallen .
51+ * Returns a list of random test dates used for assertion of the holiday defined in this test .
5352 *
54- * @return array<array> list of test dates
53+ * @return array<array> list of test dates for the holiday defined in this test
5554 *
5655 * @throws \Exception
5756 */
58- public function CommemorationOfTheFallenDataProvider (): array
57+ public static function HolidayDataProvider (): array
5958 {
60- return $ this -> generateRandomDates (11 , 2 , self ::TIMEZONE );
59+ return static :: generateRandomDates (11 , 2 , self ::TIMEZONE );
6160 }
6261
6362 /**
64- * Tests translated name of the Commemoration of the Fallen.
63+ * Tests the translated name of the Commemoration of the Fallen.
6564 *
6665 * @throws \Exception
6766 */
@@ -70,7 +69,7 @@ public function testTranslation(): void
7069 $ this ->assertTranslatedHolidayName (
7170 self ::REGION ,
7271 self ::HOLIDAY ,
73- $ this -> generateRandomYear (),
72+ static :: generateRandomYear (),
7473 [self ::LOCALE => 'Commemorazione dei Defunti ' ]
7574 );
7675 }
@@ -82,6 +81,6 @@ public function testTranslation(): void
8281 */
8382 public function testHolidayType (): void
8483 {
85- $ this ->assertHolidayType (self ::REGION , self ::HOLIDAY , $ this -> generateRandomYear (), Holiday::TYPE_OFFICIAL );
84+ $ this ->assertHolidayType (self ::REGION , self ::HOLIDAY , static :: generateRandomYear (), Holiday::TYPE_OFFICIAL );
8685 }
8786}
0 commit comments