MassContactTestBase.php in Mass Contact 8
File
tests/src/Functional/MassContactTestBase.php
View source
<?php
namespace Drupal\Tests\mass_contact\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\mass_contact\Kernel\CategoryCreationTrait;
use Drupal\user\Entity\Role;
abstract class MassContactTestBase extends BrowserTestBase {
use CategoryCreationTrait;
public static $modules = [
'block',
'mass_contact',
'user',
];
protected $admin;
protected $roles;
protected function setUp() {
parent::setUp();
$this
->createUser();
$this->admin = $this
->createUser([
'mass contact administer',
'access administration pages',
]);
$this
->drupalPlaceBlock('local_actions_block');
foreach (range(1, 5) as $i) {
$rid = $this
->createRole([]);
$this->roles[$i] = Role::load($rid);
}
}
}