Revision 582db59d
Added by Assos Assos almost 9 years ago
drupal7/modules/search/search.test | ||
---|---|---|
2029 | 2029 |
} |
2030 | 2030 |
|
2031 | 2031 |
/** |
2032 |
* Tests that search returns results with punctuation in the search phrase.
|
|
2032 |
* Tests that search works with punctuation and HTML entities.
|
|
2033 | 2033 |
*/ |
2034 | 2034 |
function testPhraseSearchPunctuation() { |
2035 | 2035 |
$node = $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => "The bunny's ears were fuzzy."))))); |
2036 |
$node2 = $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => 'Dignissim Aliquam & Quieligo meus natu quae quia te. Damnum© erat— neo pneum. Facilisi feugiat ibidem ratis.'))))); |
|
2036 | 2037 |
|
2037 | 2038 |
// Update the search index. |
2038 | 2039 |
module_invoke_all('update_index'); |
... | ... | |
2045 | 2046 |
$edit = array('keys' => '"bunny\'s"'); |
2046 | 2047 |
$this->drupalPost('search/node', $edit, t('Search')); |
2047 | 2048 |
$this->assertText($node->title); |
2049 |
|
|
2050 |
// Search for "&" and verify entities are not broken up in the output. |
|
2051 |
$edit = array('keys' => '&'); |
|
2052 |
$this->drupalPost('search/node', $edit, t('Search')); |
|
2053 |
$this->assertNoRaw('<strong>&</strong>amp;'); |
|
2054 |
$this->assertText('You must include at least one positive keyword'); |
|
2055 |
|
|
2056 |
$edit = array('keys' => '&'); |
|
2057 |
$this->drupalPost('search/node', $edit, t('Search')); |
|
2058 |
$this->assertNoRaw('<strong>&</strong>amp;'); |
|
2059 |
$this->assertText('You must include at least one positive keyword'); |
|
2048 | 2060 |
} |
2049 | 2061 |
} |
2050 | 2062 |
|
Also available in: Unified diff
Update Drupal core to version 7.40