Google\Cloud\Tests\Datastore\EntityMapperTest::testResponseToPropertiesTimestampValue PHP Method

testResponseToPropertiesTimestampValue() public method

    public function testResponseToPropertiesTimestampValue()
    {
        $date = new \DateTimeImmutable();
        $data = ['foo' => ['timestampValue' => $date->format(self::DATE_FORMAT)]];
        $res = $this->mapper->responseToEntityProperties($data)['properties'];
        $this->assertInstanceOf(\DateTimeImmutable::class, $res['foo']);
        $this->assertEquals($date->format('c'), $res['foo']->format('c'));
    }