You are here

public function TermMatcherTest::testTermMatcherWidthDefaultConfiguration in Linkit 8.5

Tests term matcher with default configuration.

File

tests/src/Kernel/Matchers/TermMatcherTest.php, line 61

Class

TermMatcherTest
Tests term matcher.

Namespace

Drupal\Tests\linkit\Kernel\Matchers

Code

public function testTermMatcherWidthDefaultConfiguration() {

  /** @var \Drupal\linkit\MatcherInterface $plugin */
  $plugin = $this->manager
    ->createInstance('entity:taxonomy_term', []);
  $suggestions = $plugin
    ->execute('foo');
  $this
    ->assertEquals(5, count($suggestions
    ->getSuggestions()), 'Correct number of suggestions');
}