Commit 6750d3f6 authored by Akshay Dalvi's avatar Akshay Dalvi Committed by Sascha Grossenbacher
Browse files

Issue #3358295 by ankitv18, Rajeshreeputra, akshaydalvi212: PHP 8.2 compatibility

parent 37b3fee2
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -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,
+9 −4
Original line number Diff line number Diff line
@@ -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}
   */
@@ -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() {
+7 −0
Original line number Diff line number Diff line
@@ -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}
   */