function ResponsiveImageFieldDisplayTest::testResponsiveImageFieldFormattersPrivate

Same name in other branches
  1. 9 core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php \Drupal\Tests\responsive_image\Functional\ResponsiveImageFieldDisplayTest::testResponsiveImageFieldFormattersPrivate()
  2. 8.9.x core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php \Drupal\Tests\responsive_image\Functional\ResponsiveImageFieldDisplayTest::testResponsiveImageFieldFormattersPrivate()
  3. 10 core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php \Drupal\Tests\responsive_image\Functional\ResponsiveImageFieldDisplayTest::testResponsiveImageFieldFormattersPrivate()

Tests responsive image formatters on node display for private files.

File

core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php, line 98

Class

ResponsiveImageFieldDisplayTest
Tests responsive image display formatter.

Namespace

Drupal\Tests\responsive_image\Functional

Code

public function testResponsiveImageFieldFormattersPrivate() : void {
    $this->addTestImageStyleMappings();
    // Remove access content permission from anonymous users.
    user_role_change_permissions(RoleInterface::ANONYMOUS_ID, [
        'access content' => FALSE,
    ]);
    $this->doTestResponsiveImageFieldFormatters('private');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.