You are here

private function MetatagCoreWithI18nOutputTest::toggleOutputTranslations in Metatag 7

Enable or disable output translations.

Parameters

bool $enable: Whether or not to enable translations; defaults to TRUE.

2 calls to MetatagCoreWithI18nOutputTest::toggleOutputTranslations()
MetatagCoreWithI18nOutputTest::testI18nOutputTranslationsDisabled in tests/MetatagCoreWithI18nOutputTest.test
Verify that no output translation records are generated when it's disabled.
MetatagCoreWithI18nOutputTest::testI18nOutputTranslationsEnabled in tests/MetatagCoreWithI18nOutputTest.test
Test translations of the output tags.

File

tests/MetatagCoreWithI18nOutputTest.test, line 175
Tests for Metatag for when i18n is enabled and actively being used.

Class

MetatagCoreWithI18nOutputTest
Tests for Metatag for when i18n is enabled and actively being used.

Code

private function toggleOutputTranslations($enable = TRUE) {

  // Enable output translation.
  variable_set('metatag_i18n_translate_output', $enable);

  // Reload the translations.
  drupal_flush_all_caches();
  module_load_include('admin.inc', 'i18n_string');
  i18n_string_refresh_group('metatag');
}