assertFalse($class->isWorkingDay(new \DateTimeImmutable("2024-01-0" . $day))); } /** * @return array> */ public static function nonWorkingDayProvider(): array { return [[6], [7]]; } /** * @return \Generator> */ public static function workingDayProvider(): \Generator { for ($isNWD = 0; $isNWD <= 1; $isNWD++) { for ($x = 1; $x <= 5; $x++) { yield [$x]; } } } #[DataProvider('workingDayProvider')] public function testIsWorkingDayWillCallIsNWDForWorkingDaysAndReturnValue(int $day): void { $class = new MonToFriWorkingDayDeterminer(); $this->assertSame(true, $class->isWorkingDay(new \DateTimeImmutable("2024-01-0" . $day))); } }