Commit dc0818dc authored by webchick's avatar webchick

Issue #1202416 by xjm, joelstein: Tests for search working with node access turned on.

parent a0b0765f
......@@ -1947,3 +1947,46 @@ class SearchLanguageTestCase extends DrupalWebTestCase {
$this->assertNoText(t('Languages'), t('No languages to choose from.'));
* Tests node search with node access control.
class SearchNodeAccessTest extends DrupalWebTestCase {
public $test_user;
public static function getInfo() {
return array(
'name' => 'Search and node access',
'description' => 'Tests search functionality with node access control.',
'group' => 'Search',
function setUp() {
parent::setUp('search', 'node_access_test');
// Create a test user and log in.
$this->test_user = $this->drupalCreateUser(array('access content', 'search content', 'use advanced search'));
* Tests that search returns results with punctuation in the search phrase.
function testPhraseSearchPunctuation() {
$node = $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => "The bunny's ears were furry.")))));
// Update the search index.
// Refresh variables after the treatment.
// Submit a phrase wrapped in double quotes to include the punctuation.
$edit = array('keys' => '"bunny\'s"');
$this->drupalPost('search/node', $edit, t('Search'));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment