You are here

protected function Fast404PathTest::setUp in Fast 404 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/Fast404PathTest.php \Drupal\Tests\fast404\Functional\Fast404PathTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/Fast404PathTest.php, line 27

Class

Fast404PathTest
Tests the path checking functionality.

Namespace

Drupal\Tests\fast404\Functional

Code

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

  // Create Basic page and Article node types.
  if ($this->profile != 'standard') {
    $this
      ->drupalCreateContentType([
      'type' => 'page',
      'name' => 'Basic page',
    ]);
    $this
      ->drupalCreateContentType([
      'type' => 'article',
      'name' => 'Article',
    ]);
  }

  // Create test user and log in.
  $web_user = $this
    ->drupalCreateUser([
    'create page content',
    'edit own page content',
    'administer url aliases',
    'create url aliases',
    'access content overview',
    'administer taxonomy',
    'access administration pages',
  ]);
  $this
    ->drupalLogin($web_user);
}