You are here

public function JuiceboxFileCase::setUp in Juicebox HTML5 Responsive Image Galleries 8.3

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/JuiceboxFileCase.php \Drupal\Tests\juicebox\Functional\JuiceboxFileCase::setUp()

Define setup tasks.

Overrides BrowserTestBase::setUp

File

tests/src/Functional/JuiceboxFileCase.php, line 39

Class

JuiceboxFileCase
Tests general file and non-image handling.

Namespace

Drupal\Tests\juicebox\Functional

Code

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

  // Create and login user.
  $this->webUser = $this
    ->drupalCreateUser([
    'access content',
    'access administration pages',
    'administer site configuration',
    'administer content types',
    'administer nodes',
    'administer node fields',
    'administer node display',
    'bypass node access',
  ]);
  $this
    ->drupalLogin($this->webUser);

  // Prep a node with an image/file field and create a test entity.
  $this
    ->initNode();

  // Activte the field formatter for our new node instance.
  $this
    ->activateJuiceboxFieldFormatter();
}