You are here

public function LinkcheckerLinkLinkExtractorTest::setUp in Link checker 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/LinkcheckerLinkLinkExtractorTest.php, line 54

Class

LinkcheckerLinkLinkExtractorTest
Test html link extractor.

Namespace

Drupal\Tests\linkchecker\Kernel

Code

public function setUp() {
  parent::setUp();
  $this
    ->installSchema('system', 'sequences');
  $this
    ->installSchema('linkchecker', 'linkchecker_index');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('linkcheckerlink');
  $this
    ->installConfig([
    'field',
    'node',
    'filter',
    'linkchecker',
  ]);
  $this->linkcheckerSetting = $this->container
    ->get('config.factory')
    ->getEditable('linkchecker.settings');

  /** @var \Drupal\linkchecker\Plugin\LinkExtractorManager $extractorManager */
  $extractorManager = $this->container
    ->get('plugin.manager.link_extractor');
  $this->linkLinkExtractor = $extractorManager
    ->createInstance('link_link_extractor');
}