function MysqlDateSqlTest::providerTestGetDateFormat

Same name in other branches
  1. 9 core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\MysqlDateSqlTest::providerTestGetDateFormat()
  2. 8.9.x core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\MysqlDateSqlTest::providerTestGetDateFormat()
  3. 10 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 66

Class

MysqlDateSqlTest
Tests the MySQL-specific date query handler.

Namespace

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

Code

public static 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',
            'o j/W/H-h i s A',
            '%x %e/%v/%H-%h %i %s %p',
        ],
    ];
}

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