You are here

public function HooksExampleTest::setUp in Examples for Developers 3.x

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

Overrides BrowserTestBase::setUp

File

modules/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);
}