You are here

public function SearchSetLocaleTest::testSearchWithNumericLocale in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/search/src/Tests/SearchSetLocaleTest.php \Drupal\search\Tests\SearchSetLocaleTest::testSearchWithNumericLocale()

Verify that search works with a numeric locale set.

File

core/modules/search/src/Tests/SearchSetLocaleTest.php, line 46
Contains \Drupal\search\Tests\SearchSetLocaleTest.

Class

SearchSetLocaleTest
Tests that search works with numeric locale settings.

Namespace

Drupal\search\Tests

Code

public function testSearchWithNumericLocale() {

  // French decimal point is comma.
  setlocale(LC_NUMERIC, 'fr_FR');
  $this->nodeSearchPlugin
    ->setSearch('tapir', array(), array());

  // The call to execute will throw an exception if a float in the wrong
  // format is passed in the query to the database, so an assertion is not
  // necessary here.
  $this->nodeSearchPlugin
    ->execute();
}