You are here

public function StemmerTest::testStemming in Snowball Stemmer 2.x

Same name and namespace in other branches
  1. 8 tests/src/Unit/StemmerTest.php \Drupal\Tests\snowball_stemmer\Unit\StemmerTest::testStemming()

Test stemming for each language.

@dataProvider languageStrings

File

tests/src/Unit/StemmerTest.php, line 33

Class

StemmerTest
Test Snowball Stemmer class wrapping.

Namespace

Drupal\Tests\snowball_stemmer\Unit

Code

public function testStemming($language, $original, $stemmed) {
  $success = $this->stemmer
    ->setLanguage($language);
  $this
    ->assertTrue($success);
  $word = $this->stemmer
    ->stem($original);
  $this
    ->assertEquals($word, $stemmed);
}