Google\Cloud\Tests\BigQuery\TimestampTest::testToString PHP Method

testToString() public method

public testToString ( )
    public function testToString()
    {
        $value = new \DateTime();
        $timestamp = new Timestamp($value);
        $expected = $value->format('Y-m-d H:i:s.uP');
        $this->assertEquals($expected, (string) $timestamp);
        $this->assertEquals($expected, $timestamp->formatAsString());
    }