You are here

public function Pathautoi18nTaxonomyTest::testCleanString in Pathauto i18n 7

Test clearing of string.

File

tests/pathauto_i18n_taxonomy.test, line 79

Class

Pathautoi18nTaxonomyTest
Test functionality for taxonomy.

Code

public function testCleanString() {

  // Set appropriate title which will allow us remove parts of path.
  $initial_title = $this->title;
  $this->title .= ' ' . implode(' ', $this->availableLanguages);
  $this
    ->setCleanStringSettings();
  $this
    ->createTaxonomyTerm(TRUE, TRUE);

  // Check aliases.
  $this
    ->drupalGet('admin/config/search/path');
  foreach ($this->availableLanguages as $language) {
    $suffix = $this
      ->getCleanStringSuffix($language);
    $alias = $language . '/' . $initial_title . '/' . $suffix;
    $this
      ->assertNoText($alias, 0, "Exist alias '{$alias}' for language '{$language}' with excluded string '{$language}'.");
  }
}