You are here

public function Pathautoi18nNodeTest::testCleanString in Pathauto i18n 7

Test clearing of string.

File

tests/pathauto_i18n_node.test, line 109

Class

Pathautoi18nNodeTest
Test functionality for nodes.

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
    ->createNode($this->contentLanguage, 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}'.");
  }
}