You are here

public function AETRecursionWebTest::setUp in Advanced Entity Tokens 2.x

Throws

\Drupal\Core\Entity\EntityStorageException

Overrides BrowserTestBase::setUp

File

tests/src/Functional/AETRecursionWebTest.php, line 34

Class

AETRecursionWebTest
Tests for Advanced Entity Tokens.

Namespace

Drupal\Tests\aet\Functional

Code

public function setUp() {
  parent::setUp();

  // Speed things up with a minimal profile.
  $this->profile = 'testing';

  // As using 'testing' profile, start from scratch.
  $this
    ->drupalCreateContentType([
    'type' => 'page',
    'name' => 'Page',
  ]);

  // Setup permissions.
  $permissions = [
    'create page content',
    'edit any page content',
  ];
  $this->editor_user = $this
    ->drupalCreateUser($permissions);
  FilterFormat::create([
    'format' => 'simple_tokens',
    'name' => 'Simple Tokens',
    'filters' => [
      'token_filter' => [
        'status' => 1,
      ],
    ],
  ])
    ->save();
}