diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/search/search.test | 7 |
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> & 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észítése ', 20); |