function PostgresqlDateSqlTest::testSetTimezoneOffset
Same name in other branches
- 9 core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\PostgresqlDateSqlTest::testSetTimezoneOffset()
- 8.9.x core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\PostgresqlDateSqlTest::testSetTimezoneOffset()
- 11.x core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\PostgresqlDateSqlTest::testSetTimezoneOffset()
Tests setting the database offset.
@covers ::setTimezoneOffset
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ views/ query/ PostgresqlDateSqlTest.php, line 92
Class
- PostgresqlDateSqlTest
- Tests the PostgreSQL-specific date query handler.
Namespace
Drupal\Tests\views\Unit\Plugin\views\queryCode
public function testSetTimezoneOffset() : void {
$database = $this->prophesize(Connection::class);
$database->query("SET TIME ZONE INTERVAL '42' HOUR TO MINUTE")
->shouldBeCalledTimes(1);
$date_sql = new PostgresqlDateSql($database->reveal());
$date_sql->setTimezoneOffset(42);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.