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:
Daniel Siepmann 2020-11-30 12:47:05 +01:00
parent 98762332f5
commit a7ea6d0bc6
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -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'));
}
/**