You are here

public function Pathautoi18nTaxonomyTest::setUp in Pathauto i18n 7

SetUp method.

Overrides DrupalWebTestCase::setUp

File

tests/pathauto_i18n_taxonomy.test, line 29

Class

Pathautoi18nTaxonomyTest
Test functionality for taxonomy.

Code

public function setUp() {
  $modules[] = 'pathauto_i18n_taxonomy';
  $this
    ->prepareTest($modules);

  // Configure patterns for all language for easy testing.
  $edit = array(
    'pathauto_taxonomy_term_pattern' => 'all/[term:name]',
    'pathauto_taxonomy_term_tags_pattern' => 'neutral/[term:name]',
  );
  foreach ($this->availableLanguages as $language) {
    $edit['pathauto_taxonomy_term_tags_' . $language . '_pattern'] = $language . '/[term:name]';
  }
  $this
    ->drupalPost('admin/config/search/path/patterns', $edit, t('Save configuration'));
}