From c0049262b33826a5144bf24f46dc53b1a6674672 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Fri, 27 Dec 2013 15:22:28 -0500 Subject: Issue #1970588 by Heine: SearchExcerptTestCase should be a DrupalWebTestCase. --- modules/search/search.test | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/search') 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 fox & 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); -- cgit v1.2.3