function CommentAdminTest::setUp
Same name in this branch
- 11.x core/modules/comment/tests/src/Functional/CommentAdminTest.php \Drupal\Tests\comment\Functional\CommentAdminTest::setUp()
Same name in other branches
- 9 core/modules/comment/tests/src/Functional/CommentAdminTest.php \Drupal\Tests\comment\Functional\CommentAdminTest::setUp()
- 9 core/modules/comment/tests/src/Functional/Views/CommentAdminTest.php \Drupal\Tests\comment\Functional\Views\CommentAdminTest::setUp()
- 8.9.x core/modules/comment/tests/src/Functional/CommentAdminTest.php \Drupal\Tests\comment\Functional\CommentAdminTest::setUp()
- 8.9.x core/modules/comment/tests/src/Functional/Views/CommentAdminTest.php \Drupal\Tests\comment\Functional\Views\CommentAdminTest::setUp()
- 10 core/modules/comment/tests/src/Functional/CommentAdminTest.php \Drupal\Tests\comment\Functional\CommentAdminTest::setUp()
- 10 core/modules/comment/tests/src/Functional/Views/CommentAdminTest.php \Drupal\Tests\comment\Functional\Views\CommentAdminTest::setUp()
Overrides CommentTestBase::setUp
File
-
core/
modules/ comment/ tests/ src/ Functional/ Views/ CommentAdminTest.php, line 41
Class
- CommentAdminTest
- Tests comment approval functionality.
Namespace
Drupal\Tests\comment\Functional\ViewsCode
protected function setUp() : void {
parent::setUp();
// Make the site multilingual to have a working language field handler.
ConfigurableLanguage::create([
'id' => 'es',
'title' => 'Spanish title',
'label' => 'Spanish label',
])->save();
\Drupal::service('module_installer')->install([
'views',
]);
$view = Views::getView('comment');
$view->storage
->enable()
->save();
\Drupal::service('router.builder')->rebuildIfNeeded();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.