You are here

public function HooksExampleTest::setUp in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/hooks_example/tests/src/Functional/HooksExampleTest.php \Drupal\Tests\hooks_example\Functional\HooksExampleTest::setUp()

Overrides BrowserTestBase::setUp

File

hooks_example/tests/src/Functional/HooksExampleTest.php, line 35

Class

HooksExampleTest
Test the functionality of the Hooks Example module.

Namespace

Drupal\Tests\hooks_example\Functional

Code

public function setUp() {
  parent::setUp();
  $this
    ->createContentType([
    'type' => 'page',
  ]);
  $account = $this
    ->drupalCreateUser([
    'access administration pages',
  ]);
  $this
    ->drupalLogin($account);
}