You are here

public function TermMatcherTest::testTermMatcherWidthBundleFiler in Linkit 8.5

Tests term matcher with bundle filer.

File

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

Class

TermMatcherTest
Tests term matcher.

Namespace

Drupal\Tests\linkit\Kernel\Matchers

Code

public function testTermMatcherWidthBundleFiler() {

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