function PathNoCanonicalLinkTest::setUp

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

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();
}

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