You are here

public function SearchApiBackendUnitTest::addIndexFieldDataProvider in Search API Solr 8

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/SearchApiBackendUnitTest.php \Drupal\Tests\search_api_solr\Unit\SearchApiBackendUnitTest::addIndexFieldDataProvider()
  2. 8.2 tests/src/Unit/SearchApiBackendUnitTest.php \Drupal\Tests\search_api_solr\Unit\SearchApiBackendUnitTest::addIndexFieldDataProvider()
  3. 4.x tests/src/Unit/SearchApiBackendUnitTest.php \Drupal\Tests\search_api_solr\Unit\SearchApiBackendUnitTest::addIndexFieldDataProvider()

Data provider for testIndexField method. Set of values can be extended to check other field types and values.

Return value

array

File

tests/src/Unit/SearchApiBackendUnitTest.php, line 73

Class

SearchApiBackendUnitTest
Tests functionality of the backend.

Namespace

Drupal\Tests\search_api_solr\Unit

Code

public function addIndexFieldDataProvider() {
  return [
    [
      '0',
      'boolean',
      'false',
    ],
    [
      '1',
      'boolean',
      'true',
    ],
    [
      0,
      'boolean',
      'false',
    ],
    [
      1,
      'boolean',
      'true',
    ],
    [
      FALSE,
      'boolean',
      'false',
    ],
    [
      TRUE,
      'boolean',
      'true',
    ],
    [
      '2016-05-25T14:00:00+10',
      'date',
      '2016-05-25T04:00:00Z',
    ],
    [
      '1465819200',
      'date',
      '2016-06-13T12:00:00Z',
    ],
  ];
}