You are here

function PanelizerTestHelper::setupLocales in Panelizer 7.3

Enable some extra languages.

1 call to PanelizerTestHelper::setupLocales()
PanelizerNodeContentTranslationTest::setUp in tests/panelizer.node_content_translation.test
Sets up a Drupal site for running functional and integration tests.

File

tests/panelizer.helper.test, line 117
Test integration for the panelizer module.

Class

PanelizerTestHelper
This will be extended by other tests to simplify them and make the code more reusable.

Code

function setupLocales() {

  // Add French.
  $this
    ->addSiteLanguage('fr');

  // Add Spanish.
  $this
    ->addSiteLanguage('es');

  // Enable URL language detection and selection.
  $edit = array(
    'language[enabled][locale-url]' => '1',
  );
  $this
    ->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
  $this
    ->assertResponse(200);
}