function ImageAdminStylesTest::testImageStyleAccess

Same name in other branches
  1. 9 core/modules/image/tests/src/Functional/ImageAdminStylesTest.php \Drupal\Tests\image\Functional\ImageAdminStylesTest::testImageStyleAccess()
  2. 10 core/modules/image/tests/src/Functional/ImageAdminStylesTest.php \Drupal\Tests\image\Functional\ImageAdminStylesTest::testImageStyleAccess()
  3. 11.x core/modules/image/tests/src/Functional/ImageAdminStylesTest.php \Drupal\Tests\image\Functional\ImageAdminStylesTest::testImageStyleAccess()

Tests access for the image style listing.

File

core/modules/image/tests/src/Functional/ImageAdminStylesTest.php, line 508

Class

ImageAdminStylesTest
Tests creation, deletion, and editing of image styles and effects.

Namespace

Drupal\Tests\image\Functional

Code

public function testImageStyleAccess() {
    $style = ImageStyle::create([
        'name' => 'style_foo',
        'label' => $this->randomString(),
    ]);
    $style->save();
    $this->drupalGet('admin/config/media/image-styles');
    $this->clickLink(t('Edit'));
    $this->assertRaw(t('Select a new effect'));
}

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