You are here

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

Define setup tasks.

Overrides DrupalWebTestCase::setUp

File

tests/JuiceboxFieldFormatterCase.test, line 27
Test case for Juicebox field formatter.

Class

JuiceboxFieldFormatterCase
Class to define test case for Juicebox field formatter.

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',
    'search content',
    'access contextual links',
    '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);
}