function PathNoCanonicalLinkTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php \Drupal\Tests\path\Kernel\PathNoCanonicalLinkTest::setUp()
  2. 8.9.x core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php \Drupal\Tests\path\Kernel\PathNoCanonicalLinkTest::setUp()
  3. 10 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 35

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::createFromLangcode('de')->save();
    $this->config('language.types')
        ->setData([
        'configurable' => [
            'language_interface',
        ],
        'negotiation' => [
            'language_interface' => [
                'enabled' => [
                    'language-url' => 0,
                ],
            ],
        ],
    ])
        ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.