You are here

public function FileMatcherTest::testFileMatcherWithDefaultConfiguration in Linkit 8.5

Tests file matcher.

File

tests/src/Kernel/Matchers/FileMatcherTest.php, line 60

Class

FileMatcherTest
Tests file matcher.

Namespace

Drupal\Tests\linkit\Kernel\Matchers

Code

public function testFileMatcherWithDefaultConfiguration() {

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