Skip to content
Snippets Groups Projects

global in Kernel tests

Files
25
@@ -7,6 +7,7 @@
use Drupal\comment\Entity\Comment;
use Drupal\comment\Entity\CommentType;
use Drupal\Core\Session\AnonymousUserSession;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\entity_test\Entity\EntityTest;
use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
use Drupal\user\Entity\Role;
@@ -21,6 +22,8 @@
*/
class CommentUserNameTest extends ViewsKernelTestBase {
use StringTranslationTrait;
/**
* Admin user.
*
@@ -83,7 +86,7 @@ protected function setUp($import_test_views = TRUE): void {
$commentType = CommentType::create([
'id' => 'entity_test_comment',
'label' => t('Entity Test Comment'),
'label' => $this->t('Entity Test Comment'),
'target_entity_type_id' => 'entity_test',
]);
$commentType->save();
Loading