function SearchNodeAccessTest::testPhraseSearchPunctuation
7.x search.test | SearchNodeAccessTest::testPhraseSearchPunctuation() |
Tests that search returns results with punctuation in the search phrase.
File
- drupal-7.x/
modules/ search/ search.test, line 2022 - Tests for search.module.
Class
- SearchNodeAccessTest
- Tests node search with node access control.
Code
function testPhraseSearchPunctuation() {
$node = $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => "The bunny's ears were fuzzy.")))));
// Update the search index.
module_invoke_all('update_index');
search_update_totals();
// Refresh variables after the treatment.
$this->refreshVariables();
// Submit a phrase wrapped in double quotes to include the punctuation.
$edit = array('keys' => '"bunny\'s"');
$this->drupalPost('search/node', $edit, t('Search'));
$this->assertText($node->title);
}