Google\Cloud\Tests\BigQuery\DateTest::testStringFormatting PHP Method

testStringFormatting() public method

    public function testStringFormatting()
    {
        $value = new \DateTime();
        $date = new Date($value);
        $expected = $value->format('Y-m-d');
        $this->assertEquals($expected, (string) $date);
        $this->assertEquals($expected, $date->formatAsString());
    }