public function JuiceboxConfCase::setUp in Juicebox HTML5 Responsive Image Galleries 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/JuiceboxConfCase.php \Drupal\Tests\juicebox\Functional\JuiceboxConfCase::setUp()
Define setup tasks.
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ JuiceboxConfCase.php, line 25
Class
- JuiceboxConfCase
- Tests gallery-specific configuration logic for Juicebox galleries.
Namespace
Drupal\Tests\juicebox\FunctionalCode
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();
// Create a test node.
$this
->createNodeWithFile();
// Start all cases as an anon user.
$this
->drupalLogout();
}