You are here

public function DateRecurViewsOccurrenceFilterTest::providerInvalidInput in Recurring Dates Field 3.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/DateRecurViewsOccurrenceFilterTest.php \Drupal\Tests\date_recur\Kernel\DateRecurViewsOccurrenceFilterTest::providerInvalidInput()
  2. 3.x tests/src/Kernel/DateRecurViewsOccurrenceFilterTest.php \Drupal\Tests\date_recur\Kernel\DateRecurViewsOccurrenceFilterTest::providerInvalidInput()
  3. 3.1.x tests/src/Kernel/DateRecurViewsOccurrenceFilterTest.php \Drupal\Tests\date_recur\Kernel\DateRecurViewsOccurrenceFilterTest::providerInvalidInput()

Data provider for testInvalidInput.

Return value

array Data for testing.

File

tests/src/Kernel/DateRecurViewsOccurrenceFilterTest.php, line 696

Class

DateRecurViewsOccurrenceFilterTest
Tests the results of 'date_recur_occurrences_filter' filter plugin.

Namespace

Drupal\Tests\date_recur\Kernel

Code

public function providerInvalidInput() {
  $data = [];
  $data['year success 1'] = [
    'year',
    '2014',
    TRUE,
  ];
  $data['year failure 2'] = [
    'year',
    '205',
    FALSE,
  ];
  $data['year failure 3'] = [
    'year',
    '20145',
    FALSE,
  ];
  $data['month success 1'] = [
    'month',
    '2014-09',
    TRUE,
  ];
  $data['month failure 2'] = [
    'month',
    '2014-9',
    FALSE,
  ];
  $data['month failure 4'] = [
    'month',
    '2014-090',
    FALSE,
  ];
  $data['day success 1'] = [
    'day',
    '2014-09-13',
    TRUE,
  ];
  $data['day failure 2'] = [
    'day',
    '2014-09-3',
    FALSE,
  ];
  $data['day failure 3'] = [
    'day',
    '2014-09-113',
    FALSE,
  ];
  $data['second success 1'] = [
    'second',
    '2014-09-13T12:59:59',
    TRUE,
  ];
  $data['second failure 2'] = [
    'second',
    '2014-09-13T121:59:59',
    FALSE,
  ];
  $data['second failure 3'] = [
    'second',
    '2014-09-13T12:599:59',
    FALSE,
  ];
  $data['second failure 4'] = [
    'second',
    '2014-09-13T12:59:599',
    FALSE,
  ];
  return $data;
}