. namespace core; /** * Tests for the standard ClockInterface implementation. * * @package core * @category test * @copyright 2024 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\system_clock */ final class system_clock_test extends \advanced_testcase { public function test_now(): void { $starttime = time(); $clock = new system_clock(); $now = $clock->now(); $this->assertInstanceOf(\DateTimeImmutable::class, $now); $this->assertGreaterThanOrEqual($starttime, $now->getTimestamp()); } }