You are here

protected function CropFunctionalTest::setUp in Crop API 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/CropFunctionalTest.php \Drupal\Tests\crop\Functional\CropFunctionalTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/CropFunctionalTest.php, line 49

Class

CropFunctionalTest
Functional tests for crop API.

Namespace

Drupal\Tests\crop\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->adminUser = $this
    ->drupalCreateUser([
    'administer crop types',
    'administer image styles',
  ]);

  // Create test image style.
  $this->testStyle = $this->container
    ->get('entity_type.manager')
    ->getStorage('image_style')
    ->create([
    'name' => 'test',
    'label' => 'Test image style',
    'effects' => [],
  ]);
  $this->testStyle
    ->save();
}