/**
* Tests timezone offset formatting.
*
* @covers ::setFieldTimezoneOffset
*/
public function testSetFieldTimezoneOffset() { $date_sql =
new PostgresqlDateSql($this->database
);
$field = 'foobar.field';
$date_sql->
setFieldTimezoneOffset($field, 42
);
$this->
assertEquals("(foobar.field + INTERVAL '42 SECONDS')",
$field);
} /**
* Tests setting the database offset.
*
* @covers ::setTimezoneOffset
*/
public function testSetTimezoneOffset() { $database =
$this->
prophesize(Connection::
class);
$database->
query("SET TIME ZONE INTERVAL '42' HOUR TO MINUTE"
)->
shouldBeCalledTimes(1
);