update core to 7.36

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-19 19:33:23 +02:00
parent 6de56c702c
commit 802ec0c6f3
271 changed files with 4111 additions and 1227 deletions

View File

@@ -2048,6 +2048,47 @@ class SearchNodeAccessTest extends DrupalWebTestCase {
}
}
/**
* Tests node search with query tags.
*/
class SearchNodeTagTest extends DrupalWebTestCase {
public $test_user;
public static function getInfo() {
return array(
'name' => 'Node search query tags',
'description' => 'Tests Node search tags functionality.',
'group' => 'Search',
);
}
function setUp() {
parent::setUp('search', 'search_node_tags');
node_access_rebuild();
// Create a test user and log in.
$this->test_user = $this->drupalCreateUser(array('search content'));
$this->drupalLogin($this->test_user);
}
/**
* Tests that the correct tags are available and hooks invoked.
*/
function testNodeSearchQueryTags() {
$this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => 'testing testing testing.')))));
// Update the search index.
module_invoke_all('update_index');
search_update_totals();
$edit = array('keys' => 'testing');
$this->drupalPost('search/node', $edit, t('Search'));
$this->assertTrue(variable_get('search_node_tags_test_query_tag', FALSE), 'hook_query_alter() was invoked and the query contained the "search_node" tag.');
$this->assertTrue(variable_get('search_node_tags_test_query_tag_hook', FALSE), 'hook_query_search_node_alter() was invoked.');
}
}
/**
* Tests searching with locale values set.
*/