You are here

public function ImageAdminStylesTest::testImageStyleAccess in Drupal 9

Same name and namespace in other branches
  1. 8 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 518

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('Edit');
  $this
    ->assertSession()
    ->pageTextContains("Select a new effect");
}