protected function ResponsiveImageFieldDisplayTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php \Drupal\Tests\responsive_image\Functional\ResponsiveImageFieldDisplayTest::setUp()
- 9 core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php \Drupal\Tests\responsive_image\Functional\ResponsiveImageFieldDisplayTest::setUp()
File
- core/
modules/ responsive_image/ tests/ src/ Functional/ ResponsiveImageFieldDisplayTest.php, line 57
Class
- ResponsiveImageFieldDisplayTest
- Tests responsive image display formatter.
Namespace
Drupal\Tests\responsive_image\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this->fileUrlGenerator = $this->container
->get('file_url_generator');
// 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',
]);
}