public function JuiceboxFieldFormatterCase::setUp in Juicebox HTML5 Responsive Image Galleries 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/JuiceboxFieldFormatterCase.php \Drupal\Tests\juicebox\Functional\JuiceboxFieldFormatterCase::setUp()
Define setup tasks.
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ JuiceboxFieldFormatterCase.php, line 35
Class
- JuiceboxFieldFormatterCase
- Tests the Juicebox field formatter.
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',
'search content',
'access contextual links',
]);
$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();
}