You are here

protected function FileFieldSourcesTestBase::setUpImce in FileField Sources 8

Sets up for imce test cases.

3 calls to FileFieldSourcesTestBase::setUpImce()
EmptyValuesTest::setUp in tests/src/Functional/EmptyValuesTest.php
Sets up for empty values test case.
ImceSourceTest::setUp in tests/src/Functional/ImceSourceTest.php
Sets up for imce source test case.
MultipleValuesTest::setUp in tests/src/Functional/MultipleValuesTest.php
Sets up for multiple values test case.

File

tests/src/Functional/FileFieldSourcesTestBase.php, line 64

Class

FileFieldSourcesTestBase
Base class for File Field Sources test cases.

Namespace

Drupal\Tests\filefield_sources\Functional

Code

protected function setUpImce() {
  foreach ($this->adminUser
    ->getRoles(TRUE) as $rid) {

    // Grant permission.
    $role = Role::load($rid);
    $this
      ->grantPermissions($role, [
      'administer imce',
    ]);

    // Assign member profile to user's role.
    $edit["roles_profiles[{$rid}][public]"] = 'member';
    $this
      ->drupalPostForm('admin/config/media/imce', $edit, t('Save configuration'));
  }
}