You are here

public function SearchByPageIntlTest::testTranslations in Search by Page 6

Same name and namespace in other branches
  1. 7 tests/search_by_page.test \SearchByPageIntlTest::testTranslations()

Tests that environment settings for main module and paths are translated.

File

tests/search_by_page.test, line 3071
Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com

Class

SearchByPageIntlTest
Environment internationalization test.

Code

public function testTranslations() {
  $this
    ->translateEnvironment();

  // Visit the search results page in English, and verify that all the
  // test strings are there.
  $this
    ->drupalPost($this->envinfo1['page_path'], array(
    'keys' => 'Trees',
  ), t('Search button 1 label'));
  $this
    ->doLanguageTest('en');

  // Now visit the page in the other language and test.
  $langs = language_list();
  $lang = $langs[$this->lang_to_use];
  $this
    ->drupalPost($this->envinfo1['page_path'], array(
    'keys' => 'Trees',
  ), $this->strings_to_test['button_label'], array(
    'language' => $lang,
  ));
  $this
    ->doLanguageTest($this->lang_to_use);
}