You are here

protected function ContactFormMatcherTest::setUp in Linkit 8.5

Overrides LinkitKernelTestBase::setUp

File

tests/src/Kernel/Matchers/ContactFormMatcherTest.php, line 32

Class

ContactFormMatcherTest
Tests contact form matcher.

Namespace

Drupal\Tests\linkit\Kernel\Matchers

Code

protected function setUp() {
  parent::setUp();

  // Create user 1 who has special permissions.
  $this
    ->createUser();
  \Drupal::currentUser()
    ->setAccount($this
    ->createUser([], [
    'access site-wide contact form',
    'view test entity translations',
  ]));
  $this->manager = $this->container
    ->get('plugin.manager.linkit.matcher');
  ContactForm::create([
    'id' => 'lorem',
    'label' => 'Lorem',
  ])
    ->save();
}