You are here

public function MinisiteTestBase::browseFixtureMinisite in Mini site 8

Helper to browse fixture pages.

3 calls to MinisiteTestBase::browseFixtureMinisite()
UploadBrowseAliasTest::testUploadAndBrowsingAlias in tests/src/Functional/UploadBrowseAliasTest.php
Tests ZIP file upload and browsing minisite pages with alias.
UploadBrowseTest::testUploadAndBrowsing in tests/src/Functional/UploadBrowseTest.php
Tests ZIP file upload and browsing minisite pages.
UploadBrowseTest::testUploadAndRemoval in tests/src/Functional/UploadBrowseTest.php
Tests ZIP file upload and removal, without removing a node.

File

tests/src/Functional/MinisiteTestBase.php, line 473

Class

MinisiteTestBase
Provides methods specifically for testing Minisite module's field handling.

Namespace

Drupal\Tests\minisite\Functional

Code

public function browseFixtureMinisite($node, $description) {

  // Visit node and start browsing minisite.
  $this
    ->drupalGet('node/' . $node
    ->id());
  $this
    ->assertResponse(200);
  $this
    ->assertLink($description);
  $this
    ->clickLink($description);

  // Brose minisite pages starting from index page.
  $this
    ->assertText('Index page');
  $this
    ->assertLink('Go to Page 1');
  $this
    ->clickLink('Go to Page 1');
  $this
    ->assertText('Page 1');
  $this
    ->assertLink('Go to Page 2');
  $this
    ->clickLink('Go to Page 2');
  $this
    ->assertResponse(200);
  $this
    ->assertHeader('Content-Type', 'text/html; charset=UTF-8');
  $this
    ->assertText('Page 2');
}