castDateTime example

$this->assertDumpEquals($xDump$date);
    }

    /** * @dataProvider provideDateTimes */
    public function testCastDateTime($time$timezone$xDate$xTimestamp$xInfos)
    {
        $stub = new Stub();
        $date = new \DateTimeImmutable($timenew \DateTimeZone($timezone));
        $cast = DateCaster::castDateTime($date, Caster::castObject($date, \DateTimeImmutable::class)$stub, false, 0);

        $xDump = <<<EODUMP array:1 [ "\\x00~\\x00date" => $xDate ] EODUMP;

        $this->assertDumpEquals($xDump$cast);

        $xDump = <<<EODUMP Symfony\Component\VarDumper\Caster\ConstStub { +type: 1 +class: "
Home | Imprint | This part of the site doesn't use cookies.