Loading tests/src/Functional/TokenBlockTest.php +13 −3 Original line number Diff line number Diff line Loading @@ -17,16 +17,26 @@ class TokenBlockTest extends TokenTestBase { */ protected static $modules = ['block', 'node', 'views', 'block_content']; /** * Admin user. * * @var \Drupal\user\UserInterface */ protected $adminUser; /** * {@inheritdoc} */ public function setUp(): void { parent::setUp(); $this->admin_user = $this->drupalCreateUser(['access content', 'administer blocks']); $this->drupalLogin($this->admin_user); $this->adminUser = $this->drupalCreateUser(['access content', 'administer blocks']); $this->drupalLogin($this->adminUser); } public function testBlockTitleTokens() { /** * {@inheritdoc} */ public function testBlockTitleTokens(): void { $label = 'tokenblock'; $bundle = BlockContentType::create([ 'id' => $label, Loading tests/src/Kernel/EntityTest.php +9 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,13 @@ class EntityTest extends KernelTestBase { */ protected static $modules = ['node', 'taxonomy', 'text']; /** * Vocabulary for testing chained token support. * * @var \Drupal\taxonomy\VocabularyInterface */ protected $vocabulary; /** * {@inheritdoc} */ Loading @@ -26,17 +33,15 @@ class EntityTest extends KernelTestBase { parent::setUp(); // Create the default tags vocabulary. $vocabulary = Vocabulary::create([ $this->vocabulary = Vocabulary::create([ 'name' => 'Tags', 'vid' => 'tags', ]); $vocabulary->save(); $this->vocabulary->save(); $this->installEntitySchema('taxonomy_term'); $this->installEntitySchema('user'); $this->installEntitySchema('node'); $this->vocab = $vocabulary; } function testEntityMapping() { Loading tests/src/Kernel/FieldTest.php +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,13 @@ class FieldTest extends KernelTestBase { */ protected $vocabulary; /** * The field used in this test class. * * @var \Drupal\field\Entity\FieldConfig */ protected $field; /** * {@inheritdoc} */ Loading Loading
tests/src/Functional/TokenBlockTest.php +13 −3 Original line number Diff line number Diff line Loading @@ -17,16 +17,26 @@ class TokenBlockTest extends TokenTestBase { */ protected static $modules = ['block', 'node', 'views', 'block_content']; /** * Admin user. * * @var \Drupal\user\UserInterface */ protected $adminUser; /** * {@inheritdoc} */ public function setUp(): void { parent::setUp(); $this->admin_user = $this->drupalCreateUser(['access content', 'administer blocks']); $this->drupalLogin($this->admin_user); $this->adminUser = $this->drupalCreateUser(['access content', 'administer blocks']); $this->drupalLogin($this->adminUser); } public function testBlockTitleTokens() { /** * {@inheritdoc} */ public function testBlockTitleTokens(): void { $label = 'tokenblock'; $bundle = BlockContentType::create([ 'id' => $label, Loading
tests/src/Kernel/EntityTest.php +9 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,13 @@ class EntityTest extends KernelTestBase { */ protected static $modules = ['node', 'taxonomy', 'text']; /** * Vocabulary for testing chained token support. * * @var \Drupal\taxonomy\VocabularyInterface */ protected $vocabulary; /** * {@inheritdoc} */ Loading @@ -26,17 +33,15 @@ class EntityTest extends KernelTestBase { parent::setUp(); // Create the default tags vocabulary. $vocabulary = Vocabulary::create([ $this->vocabulary = Vocabulary::create([ 'name' => 'Tags', 'vid' => 'tags', ]); $vocabulary->save(); $this->vocabulary->save(); $this->installEntitySchema('taxonomy_term'); $this->installEntitySchema('user'); $this->installEntitySchema('node'); $this->vocab = $vocabulary; } function testEntityMapping() { Loading
tests/src/Kernel/FieldTest.php +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,13 @@ class FieldTest extends KernelTestBase { */ protected $vocabulary; /** * The field used in this test class. * * @var \Drupal\field\Entity\FieldConfig */ protected $field; /** * {@inheritdoc} */ Loading