protected function NodeAccessLanguageFallbackTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php \Drupal\Tests\node\Functional\NodeAccessLanguageFallbackTest::setUp()
- 9 core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php \Drupal\Tests\node\Functional\NodeAccessLanguageFallbackTest::setUp()
File
- core/
modules/ node/ tests/ src/ Functional/ NodeAccessLanguageFallbackTest.php, line 33
Class
- NodeAccessLanguageFallbackTest
- Tests that the node_access system stores the proper fallback marker.
Namespace
Drupal\Tests\node\FunctionalCode
protected function setUp() : void {
parent::setUp();
// After enabling a node access module, the {node_access} table has to be
// rebuilt.
node_access_rebuild();
// Add Hungarian, Catalan, and Afrikaans.
ConfigurableLanguage::createFromLangcode('hu')
->save();
ConfigurableLanguage::createFromLangcode('ca')
->save();
ConfigurableLanguage::createFromLangcode('af')
->save();
// Enable content translation for the current entity type.
\Drupal::service('content_translation.manager')
->setEnabled('node', 'page', TRUE);
}