You are here

public function StemmerTest::testUnknownLanguage in Snowball Stemmer 8

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

Test unknown language.

File

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

Class

StemmerTest
Test Snowball Stemmer class wrapping.

Namespace

Drupal\Tests\snowball_stemmer\Unit

Code

public function testUnknownLanguage() {
  $this
    ->expectException('\\Drupal\\snowball_stemmer\\LanguageNotSetException');
  $success = $this->stemmer
    ->setLanguage('xx');
  $this
    ->assertFalse($success);
  $this->stemmer
    ->stem('word');
}