You are here

protected function RolesTest::setUp in Lightning Media 8

Same name and namespace in other branches
  1. 8.4 tests/src/Functional/RolesTest.php \Drupal\Tests\lightning_media\Functional\RolesTest::setUp()
  2. 8.2 tests/src/Functional/RolesTest.php \Drupal\Tests\lightning_media\Functional\RolesTest::setUp()
  3. 8.3 tests/src/Functional/RolesTest.php \Drupal\Tests\lightning_media\Functional\RolesTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/RolesTest.php, line 39

Class

RolesTest
@group lightning @group lightning_media

Namespace

Drupal\Tests\lightning_media\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->mediaType = $this
    ->createMediaType()
    ->id();
  $dir = __DIR__ . '/../../../' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY;
  $storage = new FileStorage($dir);
  Role::create($storage
    ->read('user.role.media_creator'))
    ->save();
  Role::create($storage
    ->read('user.role.media_manager'))
    ->save();
  $this
    ->drupalPlaceBlock('local_tasks_block');
}