You are here

FormblockTestBase.php in Form Block 2.0.x

Same filename and directory in other branches
  1. 8 tests/src/Functional/FormblockTestBase.php

File

tests/src/Functional/FormblockTestBase.php
View source
<?php

namespace Drupal\Tests\formblock\Functional;

use Drupal\Tests\BrowserTestBase;

/**
 * Defines the common form block test code.
 */
abstract class FormblockTestBase extends BrowserTestBase {

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = [
    'block',
    'node',
    'contact',
    'user',
    'formblock',
  ];

  /**
   * A user with permission to administer blocks.
   *
   * @var \Drupal\user\UserInterface
   */
  public $adminUser;
  protected function setUp() {
    parent::setUp();

    // Log in as a user that can administer bocks.
    $this->adminUser = $this
      ->drupalCreateUser([
      'administer blocks',
    ]);
    $this
      ->drupalLogin($this->adminUser);
  }

}

Classes

Namesort descending Description
FormblockTestBase Defines the common form block test code.