Chris@0: nodeSearchPlugin = $this->container->get('plugin.manager.search')->createInstance('node_search'); Chris@0: // Create a node with a very simple body. Chris@0: $this->drupalCreateNode(['body' => [['value' => 'tapir']]]); Chris@0: // Update the search index. Chris@0: $this->nodeSearchPlugin->updateIndex(); Chris@0: search_update_totals(); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Verify that search works with a numeric locale set. Chris@0: */ Chris@0: public function testSearchWithNumericLocale() { Chris@0: // French decimal point is comma. Chris@0: setlocale(LC_NUMERIC, 'fr_FR'); Chris@0: $this->nodeSearchPlugin->setSearch('tapir', [], []); Chris@0: // The call to execute will throw an exception if a float in the wrong Chris@0: // format is passed in the query to the database, so an assertion is not Chris@0: // necessary here. Chris@0: $this->nodeSearchPlugin->execute(); Chris@0: } Chris@0: Chris@0: }