You are here

public function NewResultsCheckTest::getNewResultsDataProvider in Search API Saved Searches 8

Returns test datasets for testGetNewResults().

Return value

array Array of argument arrays for testGetNewResults().

File

tests/src/Kernel/NewResultsCheckTest.php, line 193

Class

NewResultsCheckTest
Tests the functionality of "new results" checks.

Namespace

Drupal\Tests\search_api_saved_searches\Kernel

Code

public function getNewResultsDataProvider() {
  return [
    'id method' => [
      NULL,
      [
        6,
        7,
        8,
        10,
      ],
    ],
    'date field method' => [
      'created',
      [
        7,
        10,
      ],
    ],
    'max_results' => [
      NULL,
      [
        6,
        7,
      ],
      [
        'max_results' => 2,
      ],
      4,
    ],
    'date field with max_results' => [
      'created',
      [
        7,
      ],
      [
        'max_results' => 1,
      ],
      2,
    ],
    'query_limit' => [
      NULL,
      NULL,
      [
        'query_limit' => 2,
      ],
    ],
    'date field with query_limit' => [
      'created',
      [
        7,
        10,
      ],
      [
        'query_limit' => 2,
      ],
    ],
  ];
}