You are here

function LinkitControllerTest::testMatcherTitle in Linkit 8.4

Tests the matcher route title callback.

File

src/Tests/Controllers/LinkitControllerTest.php, line 53
Contains \Drupal\linkit\Tests\Controllers\LinkitControllerTest.

Class

LinkitControllerTest
Tests Linkit controller.

Namespace

Drupal\linkit\Tests\Controllers

Code

function testMatcherTitle() {

  /** @var \Drupal\linkit\MatcherInterface $plugin */
  $plugin = $this->container
    ->get('plugin.manager.linkit.matcher')
    ->createInstance('configurable_dummy_matcher');
  $matcher_uuid = $this->linkitProfile
    ->addMatcher($plugin
    ->getConfiguration());
  $this->linkitProfile
    ->save();
  $this
    ->drupalGet(Url::fromRoute('linkit.matcher.edit', [
    'linkit_profile' => $this->linkitProfile
      ->id(),
    'plugin_instance_id' => $matcher_uuid,
  ]));
  $this
    ->assertText('Edit ' . $plugin
    ->getLabel() . ' matcher');
}