File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66use Generator ;
77use Orisai \Clock \Adapter \ClockAdapterFactory ;
88use Orisai \Clock \Adapter \PsrToOrisaiClockAdapter ;
9+ use Orisai \Clock \Adapter \SymfonyToOrisaiClockAdapter ;
910use Orisai \Clock \FrozenClock ;
1011use Orisai \Clock \SystemClock ;
1112use PHPUnit \Framework \TestCase ;
1213use Psr \Clock \ClockInterface ;
1314use Symfony \Component \Clock \ClockInterface as SymfonyClock ;
1415use Symfony \Component \Clock \NativeClock ;
15- use function class_exists ;
16+ use function interface_exists ;
1617
1718final class ClockAdapterFactoryTest extends TestCase
1819{
@@ -54,10 +55,10 @@ public function now(): DateTimeImmutable
5455 SystemClock::class,
5556 ];
5657
57- if (class_exists (SymfonyClock::class)) {
58+ if (interface_exists (SymfonyClock::class)) {
5859 yield [
5960 new NativeClock (),
60- NativeClock ::class,
61+ SymfonyToOrisaiClockAdapter ::class,
6162 ];
6263 }
6364 }
Original file line number Diff line number Diff line change @@ -63,12 +63,12 @@ public function provideTimestampVariants(): Generator
6363 ];
6464
6565 yield [
66- DateTimeImmutable:: createFromFormat ( ' U ' , ' 1 ' ),
66+ new DateTimeImmutable ( ' @ 1 ' ),
6767 1 ,
6868 ];
6969
7070 yield [
71- DateTime:: createFromFormat ( ' U ' , ' 1 ' ),
71+ new DateTime ( ' @ 1 ' ),
7272 1 ,
7373 ];
7474 }
You can’t perform that action at this time.
0 commit comments