summaryrefslogtreecommitdiff
path: root/modules/search
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-12-27 15:22:28 -0500
committerDavid Rothstein <drothstein@gmail.com>2013-12-27 15:22:28 -0500
commitc0049262b33826a5144bf24f46dc53b1a6674672 (patch)
treed9c164d749803f18fe8c42380b22dcda1c9906e6 /modules/search
parent66a58e46111f1a1104ab8dec9f74199c61eb1822 (diff)
downloadbrdo-c0049262b33826a5144bf24f46dc53b1a6674672.tar.gz
brdo-c0049262b33826a5144bf24f46dc53b1a6674672.tar.bz2
Issue #1970588 by Heine: SearchExcerptTestCase should be a DrupalWebTestCase.
Diffstat (limited to 'modules/search')
-rw-r--r--modules/search/search.test7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/search/search.test b/modules/search/search.test
index d3b34a3a4..09c879b19 100644
--- a/modules/search/search.test
+++ b/modules/search/search.test
@@ -1567,7 +1567,7 @@ class SearchConfigSettingsForm extends DrupalWebTestCase {
/**
* Tests the search_excerpt() function.
*/
-class SearchExcerptTestCase extends DrupalUnitTestCase {
+class SearchExcerptTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'Search excerpt extraction',
@@ -1577,8 +1577,7 @@ class SearchExcerptTestCase extends DrupalUnitTestCase {
}
function setUp() {
- drupal_load('module', 'search');
- parent::setUp();
+ parent::setUp('search');
}
/**
@@ -1603,7 +1602,7 @@ class SearchExcerptTestCase extends DrupalUnitTestCase {
$this->assertEqual($result, 'The quick brown <strong>fox</strong> &amp; jumps over the lazy dog ...', 'Found keyword is highlighted');
$longtext = str_repeat($text . ' ', 10);
- $result = preg_replace('| +|', ' ', search_excerpt('nothing', $text));
+ $result = preg_replace('| +|', ' ', search_excerpt('nothing', $longtext));
$this->assertTrue(strpos($result, $expected) === 0, 'When keyword is not found in long string, return value starts as expected');
$entities = str_repeat('k&eacute;sz&iacute;t&eacute;se ', 20);