You are here

protected function EntityReferenceAutocompleteWidgetTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php \Drupal\FunctionalJavascriptTests\EntityReference\EntityReferenceAutocompleteWidgetTest::setUp()
  2. 9 core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php \Drupal\FunctionalJavascriptTests\EntityReference\EntityReferenceAutocompleteWidgetTest::setUp()

Overrides BrowserTestBase::setUp

File

core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php, line 34

Class

EntityReferenceAutocompleteWidgetTest
Tests the output of entity reference autocomplete widgets.

Namespace

Drupal\FunctionalJavascriptTests\EntityReference

Code

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

  // Create a Content type and two test nodes.
  $this
    ->createContentType([
    'type' => 'page',
  ]);
  $this
    ->createNode([
    'title' => 'Test page',
  ]);
  $this
    ->createNode([
    'title' => 'Page test',
  ]);
  $user = $this
    ->drupalCreateUser([
    'access content',
    'create page content',
  ]);
  $this
    ->drupalLogin($user);
}