SearchNumberMatchingTest::$numbers

Same name and namespace in other branches
  1. 9 core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php \Drupal\Tests\search\Functional\SearchNumberMatchingTest::numbers
  2. 10 core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php \Drupal\Tests\search\Functional\SearchNumberMatchingTest::numbers
  3. 11.x core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php \Drupal\Tests\search\Functional\SearchNumberMatchingTest::numbers

An array of strings containing numbers to use for testing.

Define a group of numbers that should all match each other -- numbers with internal punctuation should match each other, as well as numbers with and without leading zeros and leading/trailing . and -.

Type: string[]

File

core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php, line 46

Class

SearchNumberMatchingTest
Tests that numbers can be searched with more complex matching.

Namespace

Drupal\Tests\search\Functional

Code

protected $numbers = [
    '123456789',
    '12/34/56789',
    '12.3456789',
    '12-34-56789',
    '123,456,789',
    '-123456789',
    '0123456789',
];

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