function SqliteDateSqlTest::testSetFieldTimezoneOffset

Same name in other branches
  1. 9 core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\SqliteDateSqlTest::testSetFieldTimezoneOffset()
  2. 8.9.x core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\SqliteDateSqlTest::testSetFieldTimezoneOffset()
  3. 10 core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\SqliteDateSqlTest::testSetFieldTimezoneOffset()

Tests timezone offset formatting.

@covers ::setFieldTimezoneOffset

File

core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php, line 82

Class

SqliteDateSqlTest
Tests the MySQL-specific date query handler.

Namespace

Drupal\Tests\views\Unit\Plugin\views\query

Code

public function testSetFieldTimezoneOffset() : void {
    $date_sql = new SqliteDateSql($this->database);
    $field = 'foobar.field';
    $date_sql->setFieldTimezoneOffset($field, 42);
    $this->assertEquals("(foobar.field + 42)", $field);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.