function MysqlDateSqlTest::providerTestGetDateFormat

Same name and namespace 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. 10 core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php \Drupal\Tests\views\Unit\Plugin\views\query\MysqlDateSqlTest::providerTestGetDateFormat()
  3. 11.x 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',
        ],
    ];
}

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