You are here

public function MatcherAdminTest::testAdd in Linkit 8.5

Test adding a matcher to a profile.

File

tests/src/Functional/MatcherAdminTest.php, line 60

Class

MatcherAdminTest
Tests adding, listing, updating and deleting matchers on a profile.

Namespace

Drupal\Tests\linkit\Functional

Code

public function testAdd() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet('/admin/config/content/linkit/manage/' . $this->linkitProfile
    ->id() . '/matchers/add');

  // Create matcher.
  $edit = [];
  $edit['plugin'] = 'dummy_matcher';
  $this
    ->submitForm($edit, 'Save and continue');
  $this
    ->assertSession()
    ->pageTextContains('Added Dummy Matcher matcher.');
  $this
    ->assertSession()
    ->pageTextNotContains('No matchers added.');
}