updated core to 7.54
This commit is contained in:
@@ -1453,7 +1453,7 @@ class SearchConfigSettingsForm extends DrupalWebTestCase {
|
||||
parent::setUp('search', 'search_extra_type');
|
||||
|
||||
// Login as a user that can create and search content.
|
||||
$this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks'));
|
||||
$this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks', 'access site reports'));
|
||||
$this->drupalLogin($this->search_user);
|
||||
|
||||
// Add a single piece of content and index it.
|
||||
@@ -1502,6 +1502,19 @@ class SearchConfigSettingsForm extends DrupalWebTestCase {
|
||||
);
|
||||
$this->drupalPost('admin/config/search/settings', $edit, t('Save configuration'));
|
||||
$this->assertNoText(t('The configuration options have been saved.'), 'Form does not save with an invalid word length.');
|
||||
|
||||
// Test logging setting. It should be on by default.
|
||||
$text = $this->randomName(5);
|
||||
$this->drupalPost('search/node', array('keys' => $text), t('Search'));
|
||||
$this->drupalGet('admin/reports/dblog');
|
||||
$this->assertLink('Searched Content for ' . $text . '.', 0, 'Search was logged');
|
||||
|
||||
// Turn off logging.
|
||||
variable_set('search_logging', FALSE);
|
||||
$text = $this->randomName(5);
|
||||
$this->drupalPost('search/node', array('keys' => $text), t('Search'));
|
||||
$this->drupalGet('admin/reports/dblog');
|
||||
$this->assertNoLink('Searched Content for ' . $text . '.', 'Search was not logged');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user