Carbon trait providing utilities to mock and control the current time in tests, enabling deterministic time‑based logic.
// Source: https://github.com/briannesbitt/Carbon | License: MIT | Copyright Brian Nesbitt
// Provided via justclaw.it.com; keep this notice with the code.
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Traits;
use Carbon\CarbonInterface;
use Carbon\CarbonTimeZone;
use Carbon\Factory;
use Carbon\FactoryImmutable;
use Closure;
use DateTimeImmutable;
use DateTimeInterface;
use DateTimeZone;
trait Test
{
///////////////////////////////////////////////////////////////////
///////////////////////// TESTING AIDS ////////////////////////////
////////////////
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key