You are here

protected function ImageFieldTestBase::setUp in Drupal 10

Same name in this branch
  1. 10 core/modules/image/tests/src/Functional/ImageFieldTestBase.php \Drupal\Tests\image\Functional\ImageFieldTestBase::setUp()
  2. 10 core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php \Drupal\Tests\image\FunctionalJavascript\ImageFieldTestBase::setUp()
Same name and namespace in other branches
  1. 8 core/modules/image/tests/src/Functional/ImageFieldTestBase.php \Drupal\Tests\image\Functional\ImageFieldTestBase::setUp()
  2. 9 core/modules/image/tests/src/Functional/ImageFieldTestBase.php \Drupal\Tests\image\Functional\ImageFieldTestBase::setUp()

File

core/modules/image/tests/src/Functional/ImageFieldTestBase.php, line 48

Class

ImageFieldTestBase
This class provides methods specifically for testing Image's field handling.

Namespace

Drupal\Tests\image\Functional

Code

protected function setUp() : void {
  parent::setUp();

  // Create Basic page and Article node types.
  if ($this->profile != 'standard') {
    $this
      ->drupalCreateContentType([
      'type' => 'page',
      'name' => 'Basic page',
    ]);
    $this
      ->drupalCreateContentType([
      'type' => 'article',
      'name' => 'Article',
    ]);
  }
  $this->adminUser = $this
    ->drupalCreateUser([
    'access content',
    'access administration pages',
    'administer site configuration',
    'administer content types',
    'administer node fields',
    'administer nodes',
    'create article content',
    'edit any article content',
    'delete any article content',
    'administer image styles',
    'administer node display',
  ]);
  $this
    ->drupalLogin($this->adminUser);
}