File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public function isOpenOn(string $day): bool
92
92
93
93
public function isClosedOn (string $ day ): bool
94
94
{
95
- return $ this ->isOpenOn ($ day );
95
+ return ! $ this ->isOpenOn ($ day );
96
96
}
97
97
98
98
public function isOpenAt (DateTimeInterface $ dateTime ): bool
Original file line number Diff line number Diff line change @@ -68,6 +68,17 @@ public function it_can_determine_that_its_regularly_open_on_a_week_day()
68
68
$ this ->assertFalse ($ openingHours ->isOpenOn ('tuesday ' ));
69
69
}
70
70
71
+ /** @test */
72
+ public function it_can_determine_that_its_regularly_closed_on_a_week_day ()
73
+ {
74
+ $ openingHours = OpeningHours::create ([
75
+ 'monday ' => ['09:00-18:00 ' ],
76
+ ]);
77
+
78
+ $ this ->assertFalse ($ openingHours ->isClosedOn ('monday ' ));
79
+ $ this ->assertTrue ($ openingHours ->isClosedOn ('tuesday ' ));
80
+ }
81
+
71
82
/** @test */
72
83
public function it_can_return_the_opening_hours_for_a_specific_date ()
73
84
{
You can’t perform that action at this time.
0 commit comments