expectException(\InvalidArgumentException::class); $provider = new FixedTimeProvider([]); } public function testCurrentTimeReturnsTimestamp(): void { $timestamp = ['sec' => 1458844556, 'usec' => 200997]; $provider = new FixedTimeProvider($timestamp); $this->assertEquals($timestamp, $provider->currentTime()); } public function testCurrentTimeReturnsTimestampAfterChange(): void { $timestamp = ['sec' => 1458844556, 'usec' => 200997]; $provider = new FixedTimeProvider($timestamp); $newTimestamp = ['sec' => 1050804050, 'usec' => 30192]; $provider->setSec($newTimestamp['sec']); $provider->setUsec($newTimestamp['usec']); $this->assertEquals($newTimestamp, $provider->currentTime()); } }