1 search.test public SearchSetLocaleTest::testSearchWithNumericLocale()

Verify that search works with a numeric locale set.

File

core/modules/search/tests/search.test, line 2039
Tests for search.module.

Class

SearchSetLocaleTest
Tests searching with locale values set.

Code

public function testSearchWithNumericLocale() {
  // French decimal point is comma.
  setlocale(LC_NUMERIC, 'fr_FR');

  // An exception will be thrown if a float in the wrong format occurs in the
  // query to the database, so an assertion is not necessary here.
  db_select('search_index', 'i')
    ->extend('SearchQuery')
    ->searchexpression('tapir', 'node')
    ->execute();
}