Clock Service Provider (FastForward\Clock\Tests\ServiceProvider\ClockServiceProvider)
- Get factories will register the system clock and its aliases
- Get extensions will return an empty array
- System clock factory will create a system clock instance
- Psr clock alias will resolve the system clock from the container
- Fast forward container will resolve all aliases to the same system clock instance
- Fast forward container will allow clock overrides before the package provider
Date Time Zone Factory (FastForward\Clock\Tests\ServiceProvider\Factory\DateTimeZoneFactory)
- Returns configured date time zone instance
- Returns date time zone from configured string
- Returns default date time zone when no config
- Returns default date time zone when config has no timezone
Frozen Clock (FastForward\Clock\Tests\FrozenClock)
- Now without arguments will return current time
- Now will always return the same frozen time
- Now with string date will return the configured time
- Now with date time immutable will return the configured time
- Now with date time mutable will convert to immutable
- Now with integer timestamp will return the configured time
- Now with float timestamp will return the configured time
- Now with invalid timestamp will throw exception
- Frozen clock implements psr clock interface
- Now returns date time immutable interface
- Now with clock interface will freeze the time from that clock
System Clock (FastForward\Clock\Tests\SystemClock)
- Now with string timezone will return the current time in the configured timezone with data set #0
- Now with string timezone will return the current time in the configured timezone with data set #1
- Now with string timezone will return the current time in the configured timezone with data set #2
- Now with string timezone will return the current time in the configured timezone with data set #3
- Now with string timezone will return the current time in the configured timezone with data set #4
- Now with string timezone will return the current time in the configured timezone with data set #5
- Now with string timezone will return the current time in the configured timezone with data set #6
- Now with string timezone will return the current time in the configured timezone with data set #7
- Now with string timezone will return the current time in the configured timezone with data set #8
- Now with string timezone will return the current time in the configured timezone with data set #9
- Now with date time zone will return the current time in the configured timezone with data set #0
- Now with date time zone will return the current time in the configured timezone with data set #1
- Now with date time zone will return the current time in the configured timezone with data set #2
- Now with date time zone will return the current time in the configured timezone with data set #3
- Now with date time zone will return the current time in the configured timezone with data set #4
- Now with date time zone will return the current time in the configured timezone with data set #5
- Now with date time zone will return the current time in the configured timezone with data set #6
- Now with date time zone will return the current time in the configured timezone with data set #7
- Now with date time zone will return the current time in the configured timezone with data set #8
- Now with date time zone will return the current time in the configured timezone with data set #9
- Now without timezone will return the current time in the default timezone