public function SearchByPageIntlTest::testTranslations in Search by Page 7
Same name and namespace in other branches
- 6 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 2991 - 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);
}