Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Commit

Permalink
test CurrentProvider::getDate()
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed May 19, 2017
1 parent b0efa00 commit 3d28020
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/KdybyTests/Clock/CurrentProvider.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ class CurrentProviderTest extends Tester\TestCase
public function testNotConstant()
{
$tp = new CurrentProvider();
$date = $tp->getDate();
$datetime = $tp->getDateTime();
$time = $tp->getTime();
$timezone = $tp->getTimezone();

sleep(2);

Assert::type('\DateTimeImmutable', $datetime);
Assert::same('00:00:00', $date->format('H:i:s'));
Assert::notEqual($datetime, $tp->getDateTime());
Assert::notEqual($time->format('%h:%i:%s'), $tp->getTime()->format('%h:%i:%s'));
Assert::same($timezone->getName(), $tp->getTimezone()->getName());
Expand Down

0 comments on commit 3d28020

Please sign in to comment.