protected function ResponsiveImageFieldDisplayTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php \Drupal\Tests\responsive_image\Functional\ResponsiveImageFieldDisplayTest::setUp()
- 10 core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php \Drupal\Tests\responsive_image\Functional\ResponsiveImageFieldDisplayTest::setUp()
Drupal\simpletest\WebTestBase\setUp().
Overrides ImageFieldTestBase::setUp
File
- core/
modules/ responsive_image/ tests/ src/ Functional/ ResponsiveImageFieldDisplayTest.php, line 52
Class
- ResponsiveImageFieldDisplayTest
- Tests responsive image display formatter.
Namespace
Drupal\Tests\responsive_image\FunctionalCode
protected function setUp() {
parent::setUp();
// Create user.
$this->adminUser = $this
->drupalCreateUser([
'administer responsive images',
'access content',
'access administration pages',
'administer site configuration',
'administer content types',
'administer node display',
'administer nodes',
'create article content',
'edit any article content',
'delete any article content',
'administer image styles',
]);
$this
->drupalLogin($this->adminUser);
// Add responsive image style.
$this->responsiveImgStyle = ResponsiveImageStyle::create([
'id' => 'style_one',
'label' => 'Style One',
'breakpoint_group' => 'responsive_image_test_module',
'fallback_image_style' => 'large',
]);
}