You are here

public function JuiceboxConfCase::setUp in Juicebox HTML5 Responsive Image Galleries 7.2

Define setup tasks.

Overrides DrupalWebTestCase::setUp

File

tests/JuiceboxConfCase.test, line 28
Test case for gallery-specific Juicebox configuration options.

Class

JuiceboxConfCase
Class to define test case for gallery-specific Juicebox configuration options.

Code

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

  // Create and login user.
  $this->webUser = $this
    ->drupalCreateUser(array(
    'access content',
    'access administration pages',
    'administer site configuration',
    'administer content types',
    'administer nodes',
    'create article content',
    'edit any article content',
    'delete any article content',
    'administer image styles',
    'administer fields',
  ));
  $this
    ->drupalLogin($this->webUser);

  // Prep an article with an image field and activate the Juicebox display
  // formatter for it.
  $this
    ->prepArticle();
  $this
    ->activateJuiceboxFieldFormatter($this->instance);
}