function SqliteDateSqlTest::testGetDateFormat
Same name in other branches
- 8.9.x core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\SqliteDateSqlTest::testGetDateFormat()
- 10 core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\SqliteDateSqlTest::testGetDateFormat()
- 11.x core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\SqliteDateSqlTest::testGetDateFormat()
Tests date formatting replacement.
@covers ::getDateFormat
@dataProvider providerTestGetDateFormat
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ views/ query/ SqliteDateSqlTest.php, line 55
Class
- SqliteDateSqlTest
- Tests the MySQL-specific date query handler.
Namespace
Drupal\Tests\views\Unit\Plugin\views\queryCode
public function testGetDateFormat($field, $format, $expected) {
$date_sql = new SqliteDateSql($this->database);
$this->assertEquals($expected, $date_sql->getDateFormat($field, $format));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.