You are here

public function MysqlDateSqlTest::providerTestGetDateFormat in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\MysqlDateSqlTest::providerTestGetDateFormat()
  2. 9 core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\MysqlDateSqlTest::providerTestGetDateFormat()

Provider for date formatting test.

File

core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php, line 64

Class

MysqlDateSqlTest
Tests the MySQL-specific date query handler.

Namespace

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

Code

public function providerTestGetDateFormat() {
  return [
    [
      'foo.field',
      'Y-y-M-m',
      '%Y-%y-%b-%m',
    ],
    [
      'bar.field',
      'n-F D d l',
      '%c-%M %a %d %W',
    ],
    [
      'baz.bar_field',
      'j/W/H-h i s A',
      '%e/%v/%H-%h %i %s %p',
    ],
  ];
}