function PostgresqlDateSqlTest::testSetFieldTimezoneOffset
Same name in other branches
- 8.9.x core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\PostgresqlDateSqlTest::testSetFieldTimezoneOffset()
- 10 core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\PostgresqlDateSqlTest::testSetFieldTimezoneOffset()
- 11.x core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\PostgresqlDateSqlTest::testSetFieldTimezoneOffset()
Tests timezone offset formatting.
@covers ::setFieldTimezoneOffset
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ views/ query/ PostgresqlDateSqlTest.php, line 77
Class
- PostgresqlDateSqlTest
- Tests the PostgreSQL-specific date query handler.
Namespace
Drupal\Tests\views\Unit\Plugin\views\queryCode
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.