You are here

protected function PathNoCanonicalLinkTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php \Drupal\Tests\path\Kernel\PathNoCanonicalLinkTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php, line 30

Class

PathNoCanonicalLinkTest
Tests path alias deletion when there is no canonical link template.

Namespace

Drupal\Tests\path\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('entity_test_mul');

  // Adding german language.
  ConfigurableLanguage::create([
    'id' => 'de',
  ])
    ->save();
  $this
    ->config('language.types')
    ->setData([
    'configurable' => [
      'language_interface',
    ],
    'negotiation' => [
      'language_interface' => [
        'enabled' => [
          'language-url' => 0,
        ],
      ],
    ],
  ])
    ->save();
}