You are here

protected function LinkitAutocompleteTest::setUp in Linkit 8.5

Overrides LinkitKernelTestBase::setUp

File

tests/src/Kernel/LinkitAutocompleteTest.php, line 53

Class

LinkitAutocompleteTest
Tests the linkit autocomplete functionality.

Namespace

Drupal\Tests\linkit\Kernel

Code

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

  // Create user 1 who has special permissions.
  $this
    ->createUser();
  \Drupal::currentUser()
    ->setAccount($this
    ->createUser([], [
    'view test entity',
  ]));
  \Drupal::service('router.builder')
    ->rebuild();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('entity_test_mul');
  $this->matcherManager = $this->container
    ->get('plugin.manager.linkit.matcher');
  $this->linkitProfile = $this
    ->createProfile();
}