1 views_translatable.test | public ViewsTranslatableTest::testTranslation() |
Make sure that the translations get into the loaded view.
File
- core/
modules/ views/ tests/ views_translatable.test, line 100 - Definition of ViewsTranslatableTest.
Class
- ViewsTranslatableTest
- Tests Views pluggable translations.
Code
public function testTranslation() {
$view = $this->viewUnpackTranslatable();
$view->set_display('default');
$this->executeView($view);
$expected_strings = array();
foreach ($this->strings as $string) {
$expected_strings[] = $string .= '-translated';
}
$this->assertEqual(sort($expected_strings), sort($view->localization_plugin->translated_strings), 'Make sure that every string got loaded translated');
}