mirror of
https://github.com/werkraum-media/calendar.git
synced 2024-11-24 02:36:08 +01:00
Fix broken tests
As day is always set to midnight, an existing test did not work anymore. This was now split up into two separate more explicit tests.
This commit is contained in:
parent
98762332f5
commit
a7ea6d0bc6
1 changed files with 13 additions and 1 deletions
|
@ -70,7 +70,19 @@ class DayTest extends TestCase
|
|||
);
|
||||
|
||||
self::assertInstanceOf(\DateTimeImmutable::class, $subject->getDateTimeInstance());
|
||||
self::assertSame($dateTimeInstance->format('U'), $subject->getDateTimeInstance()->format('U'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function providedDateTimeInstanceHasExpectedDay(): void
|
||||
{
|
||||
$dateTimeInstance = new \DateTime();
|
||||
$subject = new Day(
|
||||
$dateTimeInstance
|
||||
);
|
||||
|
||||
self::assertSame($dateTimeInstance->format('d.m.Y'), $subject->getDateTimeInstance()->format('d.m.Y'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue