You are here

public function NodeMatcherTest::testNodeMatcherWidthBundleFiler in Linkit 8.5

Tests node matcher with bundle filer.

File

tests/src/Kernel/Matchers/NodeMatcherTest.php, line 110

Class

NodeMatcherTest
Tests node matcher.

Namespace

Drupal\Tests\linkit\Kernel\Matchers

Code

public function testNodeMatcherWidthBundleFiler() {

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