You are here

public function SearchByPageTesterTest::search_by_page_test_preprocess_search_result in Search by Page 8

Implements MODULE_preprocess_HOOK() for search-result.tpl.php.

Makes sure the 'type' is displayed, so that the internationalization test can verify it's translated.

File

tests/src/Functional/SearchByPageTesterTest.php, line 513
General Functional Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com

Class

SearchByPageTesterTest
Base class for testing Search by Page.

Namespace

Drupal\Tests\search_by_page\Functional

Code

public function search_by_page_test_preprocess_search_result(&$variables) {
  if (isset($variables['result']['type'])) {
    $variables['info_split']['type'] = Html::escape($variables['result']['type']);
    $variables['info'] = implode(' - ', $variables['info_split']);
  }
}