You are here

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

Same name in this branch
  1. 2.x tests/src/Unit/StemmerTest.php \Drupal\Tests\snowball_stemmer\Unit\StemmerTest::testOverrides()
  2. 2.x tests/src/Unit/Plugin/Processor/StemmerTest.php \Drupal\Tests\snowball_stemmer\Unit\Plugin\Processor\StemmerTest::testOverrides()
Same name and namespace in other branches
  1. 8 tests/src/Unit/Plugin/Processor/StemmerTest.php \Drupal\Tests\snowball_stemmer\Unit\Plugin\Processor\StemmerTest::testOverrides()

Check exceptions/overrides configuration is set.

File

tests/src/Unit/Plugin/Processor/StemmerTest.php, line 281

Class

StemmerTest
Tests the "Stemmer" processor.

Namespace

Drupal\Tests\snowball_stemmer\Unit\Plugin\Processor

Code

public function testOverrides() {
  $this->stemmerService
    ->expects($this
    ->once())
    ->method('setOverrides')
    ->with([
    'word' => 'overridden',
  ]);
  $this->processor
    ->setConfiguration([
    'exceptions' => [
      'word' => 'overridden',
    ],
  ]);
  $this->processor
    ->getStemmer();
}