You are here

protected function SimpleGmapTest::setUp in Simple Google Maps 8

Same name and namespace in other branches
  1. 3.0.x tests/src/FunctionalJavascript/SimpleGmapTest.php \Drupal\Tests\simple_gmap\FunctionalJavascript\SimpleGmapTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/SimpleGmapTest.php, line 60

Class

SimpleGmapTest
Creates a page to look at to test the Simple Google Maps module.

Namespace

Drupal\Tests\simple_gmap\FunctionalJavascript

Code

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

  // Create and login as an authenticated user.
  $auth_user = $this
    ->drupalCreateUser([
    'access content',
    'administer node display',
  ]);
  $this
    ->drupalLogin($auth_user);

  // Create a stress test node with three fields where the default values
  // will exercise the formatter.
  $this->node = Node::create([
    'type' => 'simple_gmap_stress_test',
    'title' => 'A three field node',
  ]);
  $this->node
    ->save();
}