summaryrefslogtreecommitdiff
path: root/modules/search
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-10-20 01:15:58 +0000
committerDries Buytaert <dries@buytaert.net>2010-10-20 01:15:58 +0000
commitcb1f944383477ea46d49326887ababb8f64899dd (patch)
tree92e23632a5b3a0e2a0abedfc7c697e1b44262440 /modules/search
parent11289d69fe59b9679062765b22c1f097ede9cb86 (diff)
downloadbrdo-cb1f944383477ea46d49326887ababb8f64899dd.tar.gz
brdo-cb1f944383477ea46d49326887ababb8f64899dd.tar.bz2
- Patch #934050 by sun, alex_b: change format into string.
Diffstat (limited to 'modules/search')
-rw-r--r--modules/search/search.test20
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/search/search.test b/modules/search/search.test
index f0d3a6a4b..040465103 100644
--- a/modules/search/search.test
+++ b/modules/search/search.test
@@ -370,7 +370,11 @@ class SearchRankingTestCase extends DrupalWebTestCase {
// Create nodes for testing.
foreach ($node_ranks as $node_rank) {
- $settings = array('type' => 'page', 'title' => array(LANGUAGE_NONE => array(array('value' => 'Drupal rocks'))), 'body' => array(LANGUAGE_NONE => array(array('value' => "Drupal's search rocks"))));
+ $settings = array(
+ 'type' => 'page',
+ 'title' => 'Drupal rocks',
+ 'body' => array(LANGUAGE_NONE => array(array('value' => "Drupal's search rocks"))),
+ );
foreach (array(0, 1) as $num) {
if ($num == 1) {
switch ($node_rank) {
@@ -444,18 +448,18 @@ class SearchRankingTestCase extends DrupalWebTestCase {
shuffle($shuffled_tags);
$settings = array(
'type' => 'page',
- 'title' => array(LANGUAGE_NONE => array(array('value' => 'Simple node'))),
+ 'title' => 'Simple node',
);
foreach ($shuffled_tags as $tag) {
switch ($tag) {
case 'a':
- $settings['body'] = array(LANGUAGE_NONE => array(array('value' => l('Drupal Rocks', 'node'), 'format' => 3)));
+ $settings['body'] = array(LANGUAGE_NONE => array(array('value' => l('Drupal Rocks', 'node'), 'format' => 'full_html')));
break;
case 'notag':
$settings['body'] = array(LANGUAGE_NONE => array(array('value' => 'Drupal Rocks')));
break;
default:
- $settings['body'] = array(LANGUAGE_NONE => array(array('value' => "<$tag>Drupal Rocks</$tag>", 'format' => 3)));
+ $settings['body'] = array(LANGUAGE_NONE => array(array('value' => "<$tag>Drupal Rocks</$tag>", 'format' => 'full_html')));
break;
}
$nodes[$tag] = $this->drupalCreateNode($settings);
@@ -488,7 +492,7 @@ class SearchRankingTestCase extends DrupalWebTestCase {
// Test tags with the same weight against the sorted tags.
$unsorted_tags = array('u', 'b', 'i', 'strong', 'em');
foreach ($unsorted_tags as $tag) {
- $settings['body'] = array(LANGUAGE_NONE => array(array('value' => "<$tag>Drupal Rocks</$tag>", 'format' => 3)));
+ $settings['body'] = array(LANGUAGE_NONE => array(array('value' => "<$tag>Drupal Rocks</$tag>", 'format' => 'full_html')));
$node = $this->drupalCreateNode($settings);
// Update the search index.
@@ -523,7 +527,7 @@ class SearchRankingTestCase extends DrupalWebTestCase {
// See testRankings() above - build a node that will rank high for sticky.
$settings = array(
'type' => 'page',
- 'title' => array(LANGUAGE_NONE => array(array('value' => 'Drupal rocks'))),
+ 'title' => 'Drupal rocks',
'body' => array(LANGUAGE_NONE => array(array('value' => "Drupal's search rocks"))),
'sticky' => 1,
);
@@ -712,9 +716,9 @@ class SearchCommentTestCase extends DrupalWebTestCase {
// Enable check_plain() for 'Filtered HTML' text format.
$filtered_html_format_id = db_query_range('SELECT format FROM {filter_format} WHERE name = :name', 0, 1, array(':name' => 'Filtered HTML'))->fetchField();
$edit = array(
- 'filters[filter_html_escape][status]' => $filtered_html_format_id,
+ 'filters[filter_html_escape][status]' => TRUE,
);
- $this->drupalPost('admin/config/content/formats/1', $edit, t('Save configuration'));
+ $this->drupalPost('admin/config/content/formats/' . $filtered_html_format_id, $edit, t('Save configuration'));
// Allow anonymous users to search content.
$edit = array(
DRUPAL_ANONYMOUS_RID . '[search content]' => 1,