1 views_translatable.test | public ViewsTranslatableTest::testUnpackTranslatable() |
Tests the unpack translation functionality.
File
- core/
modules/ views/ tests/ views_translatable.test, line 69 - Definition of ViewsTranslatableTest.
Class
- ViewsTranslatableTest
- Tests Views pluggable translations.
Code
public function testUnpackTranslatable() {
$view = $this->viewUnpackTranslatable();
$view->init_localization();
$this->assertEqual('views_plugin_localization_test', get_class($view->localization_plugin), 'Make sure that init_localization initializes the right translation plugin');
$view->process_locale_strings('save');
$expected_strings = $this->strings;
$result_strings = $view->localization_plugin->getExportStrings();
$this->assertEqual(sort($expected_strings), sort($result_strings), 'Make sure that the localization plugin got every translatable string.');
}